aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/d2i_pu.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2003-02-21 13:58:23 +0000
committerBodo Möller <bodo@openssl.org>2003-02-21 13:58:23 +0000
commit62e3163b1b153a2414d5c258ace557a3b4d373c5 (patch)
treec009b685a6ec9a7999733a92bd92cf50d1182755 /crypto/asn1/d2i_pu.c
parent8214e74f7680156c6ce5fd7ff37bef12311d1796 (diff)
downloadopenssl-62e3163b1b153a2414d5c258ace557a3b4d373c5.zip
openssl-62e3163b1b153a2414d5c258ace557a3b4d373c5.tar.gz
openssl-62e3163b1b153a2414d5c258ace557a3b4d373c5.tar.bz2
ECPublicKey_set_octet_string and ECPublicKey_get_octet_string
behaviour was not quite consistent with the conventions for d2i and i2d functions as far as handling of the 'out' or 'in' pointer is concerned. This patch changes this behaviour, and renames the functions to o2i_ECPublicKey and i2o_ECPublicKey (not 'd2i' and 'i2d' because the external encoding is just a raw object string without any DER icing). Submitted by: Nils Larsch
Diffstat (limited to 'crypto/asn1/d2i_pu.c')
-rw-r--r--crypto/asn1/d2i_pu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c
index cf97b83..4c2bd4e 100644
--- a/crypto/asn1/d2i_pu.c
+++ b/crypto/asn1/d2i_pu.c
@@ -113,9 +113,8 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
#endif
#ifndef OPENSSL_NO_EC
case EVP_PKEY_EC:
- if ((ret->pkey.eckey = ECPublicKey_set_octet_string(
- &(ret->pkey.eckey), (const unsigned char **)pp,
- length)) == NULL)
+ if ((ret->pkey.eckey = o2i_ECPublicKey(&(ret->pkey.eckey),
+ (const unsigned char **)pp, length)) == NULL)
{
ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB);
goto err;