*************************************************** issue: public EC key is shown as private
solution: check whether or not the EC key is really a private one patch: --- openssl-1.0.1-beta1/crypto/ec/eck_prn.c 2011-06-06 13:49:33.000000000 +0200 +++ openssl-1.0.1-beta1.patch/crypto/ec/eck_prn.c 2012-01-06 09:03:27.200728800 +0100 @@ -125,5 +125,9 @@ if (!pk || !EVP_PKEY_set1_EC_KEY(pk, (EC_KEY *)x)) return 0; - ret = EVP_PKEY_print_private(bp, pk, off, NULL); + + if (!EC_KEY_get0_private_key(x)) + ret = EVP_PKEY_print_public(bp, pk, off, NULL); + else + ret = EVP_PKEY_print_private(bp, pk, off, NULL); EVP_PKEY_free(pk); return ret; ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org