summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ec_ameth.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec/ec_ameth.c')
-rw-r--r--crypto/ec/ec_ameth.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/crypto/ec/ec_ameth.c b/crypto/ec/ec_ameth.c
index 6567a2f398..7fcc2c8043 100644
--- a/crypto/ec/ec_ameth.c
+++ b/crypto/ec/ec_ameth.c
@@ -543,6 +543,19 @@ const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = {
old_ec_priv_encode
};
+int EC_KEY_print(BIO *bp, const EC_KEY *x, int off)
+{
+ int private = EC_KEY_get0_private_key(x) != NULL;
+
+ return do_EC_KEY_print(bp, x, off,
+ private ? EC_KEY_PRINT_PUBLIC : EC_KEY_PRINT_PUBLIC);
+}
+
+int ECParameters_print(BIO *bp, const EC_KEY *x)
+{
+ return do_EC_KEY_print(bp, x, 4, EC_KEY_PRINT_PARAM);
+}
+
#ifndef OPENSSL_NO_CMS
static int ecdh_cms_set_peerkey(EVP_PKEY_CTX *pctx,