]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - test/04-pkey.t
Adjust printing options as we print pubkey only
[openssl-gost/engine.git] / test / 04-pkey.t
index f5e654da54b74db07c7a40a7731eb4c2867e811d..78f070e73f42f392bf85ad795d819dc93ed3bcc4 100644 (file)
@@ -133,10 +133,10 @@ ENjS+gA=
         print $F $pubkey;
         close $F;
         #3. Прочитать публичный и напечать его в виде текста
-        is(`openssl pkey -pubin -noout -in tmp.pem -text`,$pubtext,
+        is(`openssl pkey -pubin -noout -in tmp.pem -text_pub`,$pubtext,
             "Read and print public key $alg:$paramset");
     }
-    unlink "tmp.pem";
+    #unlink "tmp.pem";
 };
 
 #4. Сгенерировать ключ два раза (для всех алгоритов и параметров).
@@ -315,7 +315,7 @@ MIGgMBcGCCqFAwcBAQECMAsGCSqFAwcBAgECAwOBhAAEgYCPdAER26Ym73DSUXBamTLJcntdV3oZ7RRx
         # Bob: derive
         system("openssl pkeyutl -derive -inkey bob.prv -keyform PEM -peerkey alice.pub.der -peerform DER -pkeyopt ukmhex:0100000000000000 -out secret_b.bin");
         like(`openssl dgst -sha256 -r secret_b.bin`, qr/^$secrethash/, "Compute shared key:$id:Bob");
-        if ($malice ne "") {
+        if (defined $malice && $malice ne "") {
             # Malice: negative test -- this PEM is in the small subgroup
             open $F,">",'malice.pub';
             print $F $malice;