diff options
author | Bodo Möller <bodo@openssl.org> | 2003-02-21 13:58:23 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2003-02-21 13:58:23 +0000 |
commit | 62e3163b1b153a2414d5c258ace557a3b4d373c5 (patch) | |
tree | c009b685a6ec9a7999733a92bd92cf50d1182755 /crypto/asn1 | |
parent | 8214e74f7680156c6ce5fd7ff37bef12311d1796 (diff) |
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')
-rw-r--r-- | crypto/asn1/d2i_pu.c | 5 | ||||
-rw-r--r-- | crypto/asn1/i2d_pu.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c index cf97b83eac..4c2bd4e5c8 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; diff --git a/crypto/asn1/i2d_pu.c b/crypto/asn1/i2d_pu.c index 85220b44d6..44f186442e 100644 --- a/crypto/asn1/i2d_pu.c +++ b/crypto/asn1/i2d_pu.c @@ -85,7 +85,7 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) #endif #ifndef OPENSSL_NO_EC case EVP_PKEY_EC: - return(ECPublicKey_get_octet_string(a->pkey.eckey, pp)); + return(i2o_ECPublicKey(a->pkey.eckey, pp)); #endif default: ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); |