--- approveCSR.dist	2005-09-27 18:51:52.000000000 +0200
+++ approveCSR	2005-09-27 18:55:31.000000000 +0200
@@ -46,7 +46,11 @@
 
 ## FIXME: should we check the subject here if it is not dynamic via serials?
 
-if ($dataType !~ /RENEW/i and not $req->getParsed()->{HEADER}->{RENEW}) {
+my $allowPublicKeyReuse = getRequired('AllowPublicKeyReuse');
+
+if ($dataType !~ /RENEW/i and not $req->getParsed()->{HEADER}->{RENEW}
+   and not ($allowPublicKeyReuse =~ /YES/i));
+) {
 	# check the public key
 	## Check if there are certificates with the same keys
 	my @certList = $db->searchItems( DATATYPE=>    "CERTIFICATE",
