## OpenCA - Public Web-Gateway Command
## (c) 1998-2001 by Massimiliano Pala and OpenCA Group
##
##   File Name: sendcert
##     Version: $Revision: 1.4.2.1 $
##       Brief: submit the ca_certificate
## Description: submit the actual ca-certificate
##  Parameters:                                                                              

sub cmdSendcert {

	my $cacert = getRequired( 'CACertificate' );

	if (not open (FD ,"$cacert")) {
		print "Content-type: text/html\n\n";
		configError ( gettext ("Can't access CA Certificate!") );
		return undef;
	}

	print "Content-Type: application/x-x509-ca-cert\n\n";

	while (<FD>) {
		print $_;
	}

	close FD;
}

1;
