## OpenCA - Public Web-Gateway Command
## (c) 1998-2001 by OpenCA Group
##
##   File Name: revoke_req
##       Brief: begin to revoke a certificate
## Description: get the certificate which should be revoked and prompt
##              the user to a second ok
##  Parameters: none

sub cmdRevoke_req {

	## Get required configuration parametes
	my $basedoc     = getRequired( "RevReqStartSheet" );

	## Load base page
	my $page = $query->getFile ( $basedoc );

	## try to determine a serial
	my $serial = $query->param ('key');
	if (not defined $serial or (not $serial and ($serial !~ /0/))) {
		$serial = $ENV{'SSL_CLIENT_M_SERIAL'};
	}

	## Substitute the Variables in the $page
	$page = $query->subVar( $page, '@SERIAL@', $serial );
	$page = $query->subVar( $page, '@REASON@', gettext ("Private key compromised.") );

	print "$page";

}

1;
