projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Extend EVP_PKEY_copy_parameters()
[openssl.git]
/
crypto
/
dsa
/
dsa_ameth.c
diff --git
a/crypto/dsa/dsa_ameth.c
b/crypto/dsa/dsa_ameth.c
index d1d32c69598a4dae3d9df931c23b1cd335b3ecf7..92976bc3d522a34ea16f22273949c12c078909bd 100644
(file)
--- a/
crypto/dsa/dsa_ameth.c
+++ b/
crypto/dsa/dsa_ameth.c
@@
-364,6
+364,12
@@
static int dsa_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
{
BIGNUM *a;
+ if (to->pkey.dsa == NULL) {
+ to->pkey.dsa = DSA_new();
+ if (to->pkey.dsa == NULL)
+ return 0;
+ }
+
if ((a = BN_dup(from->pkey.dsa->p)) == NULL)
return 0;
BN_free(to->pkey.dsa->p);