summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecx_meth.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-07-03 18:30:03 +0200
committerMatt Caswell <matt@openssl.org>2019-08-06 12:19:07 +0200
commita9612d6c034f47c4788c67d85651d0cd58c3faf7 (patch)
treeb3af6481b8c7a2a50b8834c3cec70841ae739f95 /crypto/ec/ecx_meth.c
parentCorrect the Extended Master Secret string for EBCDIC (diff)
downloadopenssl-a9612d6c034f47c4788c67d85651d0cd58c3faf7.tar.xz
openssl-a9612d6c034f47c4788c67d85651d0cd58c3faf7.zip
Make the EC code available from inside the FIPS provider
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9380)
Diffstat (limited to 'crypto/ec/ecx_meth.c')
-rw-r--r--crypto/ec/ecx_meth.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/crypto/ec/ecx_meth.c b/crypto/ec/ecx_meth.c
index 1958aa2610..75ea96754f 100644
--- a/crypto/ec/ecx_meth.c
+++ b/crypto/ec/ecx_meth.c
@@ -110,7 +110,11 @@ static int ecx_key_op(EVP_PKEY *pkey, int id, const X509_ALGOR *palg,
X448_public_from_private(pubkey, privkey);
break;
case EVP_PKEY_ED448:
- ED448_public_from_private(pubkey, privkey);
+ /*
+ * TODO(3.0): We set the library context to NULL for now. This will
+ * need to change.
+ */
+ ED448_public_from_private(NULL, pubkey, privkey);
break;
}
}
@@ -771,8 +775,12 @@ static int pkey_ecd_digestsign448(EVP_MD_CTX *ctx, unsigned char *sig,
return 0;
}
- if (ED448_sign(sig, tbs, tbslen, edkey->pubkey, edkey->privkey, NULL,
- 0) == 0)
+ /*
+ * TODO(3.0): We use NULL for the library context for now. Will need to
+ * change later.
+ */
+ if (ED448_sign(NULL, sig, tbs, tbslen, edkey->pubkey, edkey->privkey,
+ NULL, 0) == 0)
return 0;
*siglen = ED448_SIGSIZE;
return 1;
@@ -799,7 +807,11 @@ static int pkey_ecd_digestverify448(EVP_MD_CTX *ctx, const unsigned char *sig,
if (siglen != ED448_SIGSIZE)
return 0;
- return ED448_verify(tbs, tbslen, sig, edkey->pubkey, NULL, 0);
+ /*
+ * TODO(3.0): We send NULL for the OPENSSL_CTX for now. This will need to
+ * change.
+ */
+ return ED448_verify(NULL, tbs, tbslen, sig, edkey->pubkey, NULL, 0);
}
static int pkey_ecd_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)