Commit 5664bbb5 authored by Leigh Stoller's avatar Leigh Stoller

A protogeni page that will be used by the new protogeni initsite to

automatically record a new CA certificate. Hand the certificate off
to cacontrol, which will provisionally accept the certificate so that
the caller can then register their other certificates.
parent 1cbd3dc5
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
......@@ -112,6 +112,7 @@ NLFILES += $(wildcard $(SRCDIR)/netlab/*.txt)
PGENIFILES =
ifeq ($(PGENISUPPORT),1)
PGENIFILES += $(wildcard $(SRCDIR)/protogeni/*.php3)
PGENIFILES += $(wildcard $(SRCDIR)/protogeni/*.php)
PGENIFILES += $(wildcard $(SRCDIR)/protogeni/*.xml)
endif
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# All rights reserved.
#
# Lets emulate register_globals=off for a while.
......@@ -34,6 +34,7 @@ $CVSSUPPORT = @CVSSUPPORT@;
$MAILMANSUPPORT = @MAILMANSUPPORT@;
$CHATSUPPORT = @CHATSUPPORT@;
$PROTOGENI = @PROTOGENI_SUPPORT@;
$ISCLRHOUSE = @PROTOGENI_ISCLEARINGHOUSE@;
$EXP_VIS = @EXP_VIS_SUPPORT@;
$ISOLATEADMINS = @ISOLATEADMINS@;
$CONTROL_NETWORK= "@CONTROL_NETWORK@";
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2003-2012 University of Utah and the Flux Group.
# All rights reserved.
#
chdir("..");
require("defs.php3");
if (! $ISCLRHOUSE) {
header("HTTP/1.0 404 Not Found");
return;
}
#
# Note - this script is not meant to be called by humans! It returns no useful
# information whatsoever, and expects the client to fill in all fields
# properly.
#
$reqargs = RequiredPageArguments("cert", PAGEARG_ANYTHING);
# Silent error if unusually big.
if (strlen($cert) > 0x4000) {
return;
}
$fname = tempnam("/tmp", "register_ca");
if (! $fname) {
TBERROR("Could not create temporary filename", 0);
return;
}
if (! ($fp = fopen($fname, "w"))) {
TBERROR("Could not open temp file $fname", 0);
return;
}
fwrite($fp, $cert);
fclose($fp);
chmod($fname, 0666);
$retval = SUEXEC("geniuser", $TBADMINGROUP, "webcacontrol -w $fname",
SUEXEC_ACTION_IGNORE);
unlink($fname);
if ($retval) {
#
# Want to return status to the caller.
#
header("HTTP/1.0 406 Not Acceptable");
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment