summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkey_dh.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-02 08:47:11 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-02 08:47:11 +0000
commitd77b606edd788a52e40b27838c6b1b588c1f33cd (patch)
treea68fcc343756e8e9b1473836e6da7d4579f72718 /ext/openssl/ossl_pkey_dh.c
parent10c4bb29b237ccdbf99cfe8ef44c81de5a4a9018 (diff)
* ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine.
it supports OpenSSL hardware cryptographic engine interface. * ext/openssl/ossl_engine.h: ditto. * ext/openssl/MANIFEST: add ossl_engine.c and ossl_engine.h. * ext/openssl/extconf.rb: add check for openssl/engine.h. * ext/openssl/ossl.c: call Init_ossl_engine(). * ext/openssl/ossl.h: include openssl/engine.h. * ext/openssl/ossl_pkey_{rsa,dsa,dh}.c: check if underlying EVP_PKEY referes engine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey_dh.c')
-rw-r--r--ext/openssl/ossl_pkey_dh.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c
index 80f7f2a..e4823a2 100644
--- a/ext/openssl/ossl_pkey_dh.c
+++ b/ext/openssl/ossl_pkey_dh.c
@@ -19,7 +19,14 @@
} \
} while (0)
-#define DH_PRIVATE(dh) ((dh)->priv_key)
+#define DH_HAS_PRIVATE(dh) ((dh)->priv_key)
+
+#ifdef OSSL_ENGINE_ENABLED
+# define DH_PRIVATE(dh) (DH_HAS_PRIVATE(dh) || (dh)->engine)
+#else
+# define DH_PRIVATE(dh) DH_HAS_PRIVATE(dh)
+#endif
+
/*
* Classes