aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-03-09 23:44:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-03-09 23:44:06 +0000
commit8857b380e21b7140508cbcdd57abbcafdc658463 (patch)
tree2b9761dafa13021e1ef0af999be6ebed7b738b34 /crypto
parenta6de7133bb1671e2c5ff1116ec4d337d26a64952 (diff)
downloadopenssl-8857b380e21b7140508cbcdd57abbcafdc658463.zip
openssl-8857b380e21b7140508cbcdd57abbcafdc658463.tar.gz
openssl-8857b380e21b7140508cbcdd57abbcafdc658463.tar.bz2
Add ECDH to validated module.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/ecdh/ech_key.c2
-rw-r--r--crypto/ecdh/ech_ossl.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/crypto/ecdh/ech_key.c b/crypto/ecdh/ech_key.c
index f44da92..52a4649 100644
--- a/crypto/ecdh/ech_key.c
+++ b/crypto/ecdh/ech_key.c
@@ -67,6 +67,8 @@
*
*/
+#define OPENSSL_FIPSAPI
+
#include "ech_locl.h"
#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
diff --git a/crypto/ecdh/ech_ossl.c b/crypto/ecdh/ech_ossl.c
index 4a30628..ceaa2f0 100644
--- a/crypto/ecdh/ech_ossl.c
+++ b/crypto/ecdh/ech_ossl.c
@@ -67,6 +67,7 @@
*
*/
+#define OPENSSL_FIPSAPI
#include <string.h>
#include <limits.h>
@@ -213,3 +214,15 @@ err:
if (buf) OPENSSL_free(buf);
return(ret);
}
+
+#ifdef OPENSSL_FIPSCANISTER
+/* FIPS stanadlone version of ecdh_check: just return FIPS method */
+ECDH_DATA *fips_ecdh_check(EC_KEY *key)
+ {
+ static ECDH_DATA rv = {
+ 0,0,0,
+ &openssl_ecdh_meth
+ };
+ return &rv;
+ }
+#endif