diff options
Diffstat (limited to 'crypto/asn1/i2d_pu.c')
-rw-r--r-- | crypto/asn1/i2d_pu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/asn1/i2d_pu.c b/crypto/asn1/i2d_pu.c index e1f702acd8..94233cb8e9 100644 --- a/crypto/asn1/i2d_pu.c +++ b/crypto/asn1/i2d_pu.c @@ -73,21 +73,21 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) { - switch (a->type) { + switch (EVP_PKEY_id(a)) { #ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: - return (i2d_RSAPublicKey(a->pkey.rsa, pp)); + return i2d_RSAPublicKey(EVP_PKEY_get0_RSA(a), pp); #endif #ifndef OPENSSL_NO_DSA case EVP_PKEY_DSA: - return (i2d_DSAPublicKey(a->pkey.dsa, pp)); + return i2d_DSAPublicKey(EVP_PKEY_get0_DSA(a), pp); #endif #ifndef OPENSSL_NO_EC case EVP_PKEY_EC: - return (i2o_ECPublicKey(a->pkey.ec, pp)); + return i2o_ECPublicKey(EVP_PKEY_get0_EC_KEY(a), pp); #endif default: ASN1err(ASN1_F_I2D_PUBLICKEY, ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); - return (-1); + return -1; } } |