avoid a warning if certificate issuer is not present in cert
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 14 Mar 2011 05:06:29 +0000 (01:06 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 14 Mar 2011 05:27:00 +0000 (01:27 -0400)
Crypt/Monkeysphere/MSVA.pm

index 1ba0605770e774a764a15ef4849641b92dc467f7..5c48fa1e13de80e26b0b901c1325317d530d7bfe 100755 (executable)
       $key->{error} = sprintf("Error decoding X.509 certificate: %s", $cert->error);
     } else {
       msvalog('verbose', "cert subject: %s\n", $cert->subject_cn());
-      msvalog('verbose', "cert issuer: %s\n", $cert->issuer_cn());
+      msvalog('verbose', "cert issuer: %s\n", (defined $cert->issuer_cn() ? $cert->issuer_cn() : '<none>'));
       msvalog('verbose', "cert pubkey algo: %s\n", $cert->PubKeyAlg());
       msvalog('verbose', "cert pubkey: %s\n", unpack('H*', $cert->pubkey()));