diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2006-04-12 23:51:24 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2006-04-12 23:51:24 +0000 |
commit | 3ba0885a3e0d52c6bef91ce9bea26cd3eabd3594 (patch) | |
tree | 7ed7dcd305e4e21fb1236703f130fac9d9e0581a /crypto/dh/dh_ameth.c | |
parent | 023c9d8dd5fee8dfe1ccc4aea71050f4c7ca6680 (diff) |
Extend DH ASN1 method, add DH EVP_PKEY_METHOD.
Diffstat (limited to 'crypto/dh/dh_ameth.c')
-rw-r--r-- | crypto/dh/dh_ameth.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c index 3a5600cf34..6d3125789d 100644 --- a/crypto/dh/dh_ameth.c +++ b/crypto/dh/dh_ameth.c @@ -260,7 +260,7 @@ static int dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) if (!prkey) { - DHerr(DH_F_DSA_PRIV_ENCODE,DH_R_BN_ERROR); + DHerr(DH_F_DH_PRIV_ENCODE,DH_R_BN_ERROR); goto err; } @@ -268,7 +268,7 @@ static int dh_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) ASN1_INTEGER_free(prkey); - if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dsa), 0, + if (!PKCS8_pkey_set0(p8, OBJ_nid2obj(NID_dhKeyAgreement), 0, V_ASN1_SEQUENCE, params, dp, dplen)) goto err; @@ -403,9 +403,9 @@ static int dh_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) if ((a=BN_dup(from->pkey.dh->p)) == NULL) return 0; - if (to->pkey.dsa->p != NULL) + if (to->pkey.dh->p != NULL) BN_free(to->pkey.dh->p); - to->pkey.dsa->p=a; + to->pkey.dh->p=a; if ((a=BN_dup(from->pkey.dh->g)) == NULL) return 0; |