X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=test%2F04-pkey.t;h=78f070e73f42f392bf85ad795d819dc93ed3bcc4;hb=72add73e70c00f13e33db4c84a683d31dbbe21ab;hp=f5e654da54b74db07c7a40a7731eb4c2867e811d;hpb=dbc8f4780fa78d66a68174f78f9ae9aa9cdad53c;p=openssl-gost%2Fengine.git diff --git a/test/04-pkey.t b/test/04-pkey.t index f5e654d..78f070e 100644 --- a/test/04-pkey.t +++ b/test/04-pkey.t @@ -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;