Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

DHparams_dup() is a function in OpenSSL 1.0.0 but is a macro in 0.9.8.

  • Loading branch information...
commit b4df65b682ec1c70696b6fdf6b4ee43d0594184b 1 parent 3a8317b
@phonohawk authored
Showing with 10 additions and 1 deletion.
  1. +1 −1  OpenSSL/DH.hsc
  2. +5 −0 cbits/HsOpenSSL.c
  3. +4 −0 cbits/HsOpenSSL.h
View
2  OpenSSL/DH.hsc
@@ -84,7 +84,7 @@ foreign import ccall "DH_check"
_DH_check :: Ptr DH_ -> Ptr CInt -> IO Bool
foreign import ccall unsafe "DH_size"
_DH_size :: Ptr DH_ -> IO CInt
-foreign import ccall unsafe "DHparams_dup"
+foreign import ccall unsafe "HsOpenSSL_DHparams_dup"
_DH_dup :: Ptr DH_ -> IO (Ptr DH_)
foreign import ccall unsafe "HsOpenSSL_DH_get_pub_key"
_DH_get_pub_key :: Ptr DH_ -> IO (Ptr BIGNUM)
View
5 cbits/HsOpenSSL.c
@@ -44,6 +44,11 @@ int HsOpenSSL_BIO_FLAGS_BASE64_NO_NL() {
return BIO_FLAGS_BASE64_NO_NL;
}
+/* DH *************************************************************************/
+DH* HsOpenSSL_DHparams_dup(DH* dh) {
+ return DHparams_dup(dh);
+}
+
/* EVP ************************************************************************/
int HsOpenSSL_EVP_MD_size(EVP_MD* md) {
return EVP_MD_size(md);
View
4 cbits/HsOpenSSL.h
@@ -3,6 +3,7 @@
#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/bn.h>
+#include <openssl/dh.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
@@ -32,6 +33,9 @@ int HsOpenSSL_BIO_set_buffer_size(BIO* bio, int bufSize);
int HsOpenSSL_BIO_should_retry(BIO* bio);
int HsOpenSSL_BIO_FLAGS_BASE64_NO_NL();
+/* DH *************************************************************************/
+DH* HsOpenSSL_DHparams_dup(DH* dh);
+
/* EVP ************************************************************************/
int HsOpenSSL_EVP_MD_size(EVP_MD* md);
int HsOpenSSL_EVP_CIPHER_CTX_block_size(EVP_CIPHER_CTX* ctx);
Please sign in to comment.
Something went wrong with that request. Please try again.