diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:04:03 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-09-22 13:04:03 +0000 |
| commit | e1b483878d9824c63d376895da633b0b96fbbaed (patch) | |
| tree | 0846e185ed4cc1159a684e408e772c86ae0fc1a7 /crypto/evp/p_lib.c | |
| parent | 57f1256b1a087adbdf8e5c080dd9ed7975de939a (diff) | |
Notes
Diffstat (limited to 'crypto/evp/p_lib.c')
| -rw-r--r-- | crypto/evp/p_lib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index c0171244d5d0..545d04fd7744 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -130,6 +130,14 @@ int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_MISSING_PARAMETERS); goto err; } + + if (!EVP_PKEY_missing_parameters(to)) { + if (EVP_PKEY_cmp_parameters(to, from) == 1) + return 1; + EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_DIFFERENT_PARAMETERS); + return 0; + } + if (from->ameth && from->ameth->param_copy) return from->ameth->param_copy(to, from); err: |
