diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55a196c..1ed6f50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,7 +140,6 @@ jobs: # We don't checkout in $GITHUB_WORKSPACE to avoid polluting the repository with artifacts, # e.g. the C openssl library or Vibe.d cd ${{ github.workspace }}/deimos-openssl/ - dub test cd examples/sslecho/ ${{ github.workspace }}/openssl/install/bin/openssl req -batch -newkey rsa:4096 -x509 -sha256 -days 3650 -subj "/C=GB/CN=localhost" -nodes -out cert.pem -keyout key.pem dub build diff --git a/.gitignore b/.gitignore index b8eb41e..6e1f706 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Generated version file -/source/deimos/openssl/version_.d +/source/deimos/openssl/version_.di # DUB artifacts /.dub/ diff --git a/dub.sdl b/dub.sdl index da9bc2c..0bb20dc 100644 --- a/dub.sdl +++ b/dub.sdl @@ -21,12 +21,3 @@ configuration "library-manual-version" { configuration "library-applink" { targetType "sourceLibrary" } - -configuration "unittest" { - targetType "executable" - targetName "openssl-test-library" - dflags "-main" - excludedSourceFiles "source/deimos/openssl/applink.d" - preGenerateCommands `${DUB} scripts/generate_version.d` platform="posix" - versions `DeimosOpenSSLAutoDetect` -} diff --git a/scripts/generate_version.d b/scripts/generate_version.d index 6471eca..ae19cea 100644 --- a/scripts/generate_version.d +++ b/scripts/generate_version.d @@ -13,7 +13,7 @@ * * It is called directly as a `preGenerateCommand` (see dub.sdl). * To use it with another build system, pass the directory in which to write - * the `version_.d` file as first and only argument. The directory + * the `version_.di` file as first and only argument. The directory * must exist, this script will not create it. */ module generate_version; @@ -42,14 +42,14 @@ void main(string[] args) { assert(args[1].isDir(), "OpenSSL version detection: Argument '" ~ args[1] ~ "' is not a directory"); - target = args[1].buildPath("version_.d"); + target = args[1].buildPath("version_.di"); } else { assert(args.length == 1, "OpenSSL version detection expects only one argument, " ~ - "a directory path where to write `version_.d`"); - target = TARGET_DIR_PATH.buildPath("version_.d"); + "a directory path where to write `version_.di`"); + target = TARGET_DIR_PATH.buildPath("version_.di"); } string opensslVersion; diff --git a/source/deimos/openssl/_d_util.d b/source/deimos/openssl/_d_util.di similarity index 100% rename from source/deimos/openssl/_d_util.d rename to source/deimos/openssl/_d_util.di diff --git a/source/deimos/openssl/aes.d b/source/deimos/openssl/aes.di similarity index 98% rename from source/deimos/openssl/aes.d rename to source/deimos/openssl/aes.di index 90c0c8b..9b725be 100644 --- a/source/deimos/openssl/aes.d +++ b/source/deimos/openssl/aes.di @@ -1,4 +1,3 @@ -/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * diff --git a/source/deimos/openssl/applink.d b/source/deimos/openssl/applink.di similarity index 100% rename from source/deimos/openssl/applink.d rename to source/deimos/openssl/applink.di diff --git a/source/deimos/openssl/asn1.d b/source/deimos/openssl/asn1.di similarity index 100% rename from source/deimos/openssl/asn1.d rename to source/deimos/openssl/asn1.di diff --git a/source/deimos/openssl/asn1_mac.d b/source/deimos/openssl/asn1_mac.di similarity index 100% rename from source/deimos/openssl/asn1_mac.d rename to source/deimos/openssl/asn1_mac.di diff --git a/source/deimos/openssl/asn1t.d b/source/deimos/openssl/asn1t.di similarity index 99% rename from source/deimos/openssl/asn1t.d rename to source/deimos/openssl/asn1t.di index 45628a5..e144bc3 100644 --- a/source/deimos/openssl/asn1t.d +++ b/source/deimos/openssl/asn1t.di @@ -564,7 +564,7 @@ enum ASN1_TFLG_NDEF = (0x1<<11); /* This is the actual ASN1 item itself */ struct ASN1_ITEM_st { -char itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */ +ubyte itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */ c_long utype; /* underlying type */ const(ASN1_TEMPLATE)* templates; /* If SEQUENCE or CHOICE this contains the contents */ c_long tcount; /* Number of templates if SEQUENCE or CHOICE */ @@ -639,7 +639,7 @@ enum ASN1_ITYPE_NDEF_SEQUENCE = 0x6; */ struct ASN1_TLC_st{ - char valid; /* Values below are valid */ + ubyte valid; /* Values below are valid */ int ret; /* return value */ c_long plen; /* length */ int ptag; /* class value */ diff --git a/source/deimos/openssl/bio.d b/source/deimos/openssl/bio.di similarity index 100% rename from source/deimos/openssl/bio.d rename to source/deimos/openssl/bio.di diff --git a/source/deimos/openssl/blowfish.d b/source/deimos/openssl/blowfish.di similarity index 100% rename from source/deimos/openssl/blowfish.d rename to source/deimos/openssl/blowfish.di diff --git a/source/deimos/openssl/bn.d b/source/deimos/openssl/bn.di similarity index 100% rename from source/deimos/openssl/bn.d rename to source/deimos/openssl/bn.di diff --git a/source/deimos/openssl/buffer.d b/source/deimos/openssl/buffer.di similarity index 100% rename from source/deimos/openssl/buffer.d rename to source/deimos/openssl/buffer.di diff --git a/source/deimos/openssl/camellia.d b/source/deimos/openssl/camellia.di similarity index 97% rename from source/deimos/openssl/camellia.d rename to source/deimos/openssl/camellia.di index 6bf0e4e..06e1b86 100644 --- a/source/deimos/openssl/camellia.d +++ b/source/deimos/openssl/camellia.di @@ -1,4 +1,3 @@ -/* crypto/camellia/camellia.h -*- mode:C; c-file-style: "eay" -*- */ /* ==================================================================== * Copyright (c) 2006 The OpenSSL Project. All rights reserved. * @@ -81,7 +80,7 @@ alias uint[CAMELLIA_TABLE_WORD_LEN] KEY_TABLE_TYPE; /* to match with WORD */ struct camellia_key_st { union u_ { - double d; /* ensures 64-bit align */ + double d = void; /* ensures 64-bit align */ KEY_TABLE_TYPE rd_key; } u_ u; diff --git a/source/deimos/openssl/cast_.d b/source/deimos/openssl/cast_.di similarity index 100% rename from source/deimos/openssl/cast_.d rename to source/deimos/openssl/cast_.di diff --git a/source/deimos/openssl/cmac.d b/source/deimos/openssl/cmac.di similarity index 100% rename from source/deimos/openssl/cmac.d rename to source/deimos/openssl/cmac.di diff --git a/source/deimos/openssl/cms.d b/source/deimos/openssl/cms.di similarity index 100% rename from source/deimos/openssl/cms.d rename to source/deimos/openssl/cms.di diff --git a/source/deimos/openssl/comp.d b/source/deimos/openssl/comp.di similarity index 100% rename from source/deimos/openssl/comp.d rename to source/deimos/openssl/comp.di diff --git a/source/deimos/openssl/conf.d b/source/deimos/openssl/conf.di similarity index 100% rename from source/deimos/openssl/conf.d rename to source/deimos/openssl/conf.di diff --git a/source/deimos/openssl/conf_api.d b/source/deimos/openssl/conf_api.di similarity index 100% rename from source/deimos/openssl/conf_api.d rename to source/deimos/openssl/conf_api.di diff --git a/source/deimos/openssl/crypto.d b/source/deimos/openssl/crypto.di similarity index 100% rename from source/deimos/openssl/crypto.d rename to source/deimos/openssl/crypto.di diff --git a/source/deimos/openssl/des.d b/source/deimos/openssl/des.di similarity index 100% rename from source/deimos/openssl/des.d rename to source/deimos/openssl/des.di diff --git a/source/deimos/openssl/dh.d b/source/deimos/openssl/dh.di similarity index 100% rename from source/deimos/openssl/dh.d rename to source/deimos/openssl/dh.di diff --git a/source/deimos/openssl/dsa.d b/source/deimos/openssl/dsa.di similarity index 99% rename from source/deimos/openssl/dsa.d rename to source/deimos/openssl/dsa.di index 08d79d0..64c09dd 100644 --- a/source/deimos/openssl/dsa.d +++ b/source/deimos/openssl/dsa.di @@ -225,7 +225,7 @@ static if (OPENSSL_VERSION_BEFORE(1, 1, 0)) } else { - auto DSA_get_ex_new_index(c_long l, void* p, CRYPTO_EX_new* newf, + auto DSA_get_ex_new_index()(c_long l, void* p, CRYPTO_EX_new* newf, CRYPTO_EX_dup* dupf, CRYPTO_EX_free* freef) { return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef); diff --git a/source/deimos/openssl/dso.d b/source/deimos/openssl/dso.di similarity index 99% rename from source/deimos/openssl/dso.d rename to source/deimos/openssl/dso.di index 9e0e296..cbe267a 100644 --- a/source/deimos/openssl/dso.d +++ b/source/deimos/openssl/dso.di @@ -1,4 +1,3 @@ -/* dso.h -*- mode:C; c-file-style: "eay" -*- */ /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL * project 2000. */ diff --git a/source/deimos/openssl/dtls1.d b/source/deimos/openssl/dtls1.di similarity index 100% rename from source/deimos/openssl/dtls1.d rename to source/deimos/openssl/dtls1.di diff --git a/source/deimos/openssl/e_os2.d b/source/deimos/openssl/e_os2.di similarity index 100% rename from source/deimos/openssl/e_os2.d rename to source/deimos/openssl/e_os2.di diff --git a/source/deimos/openssl/ebcdic.d b/source/deimos/openssl/ebcdic.di similarity index 100% rename from source/deimos/openssl/ebcdic.d rename to source/deimos/openssl/ebcdic.di diff --git a/source/deimos/openssl/ec.d b/source/deimos/openssl/ec.di similarity index 99% rename from source/deimos/openssl/ec.d rename to source/deimos/openssl/ec.di index 90f1249..265b72f 100644 --- a/source/deimos/openssl/ec.d +++ b/source/deimos/openssl/ec.di @@ -100,6 +100,7 @@ static if (!is(typeof(OPENSSL_ECC_MAX_FIELD_BITS))) { /** Enum for the point conversion form as defined in X9.62 (ECDSA) * for the encoding of a elliptic curve point (x,y) */ enum point_conversion_form_t { + init = 0, // Ensure initial values in D is zero /** the point is encoded as z||x, where the octet z specifies * which solution of the quadratic equation y is */ POINT_CONVERSION_COMPRESSED = 2, diff --git a/source/deimos/openssl/ecdh.d b/source/deimos/openssl/ecdh.di similarity index 100% rename from source/deimos/openssl/ecdh.d rename to source/deimos/openssl/ecdh.di diff --git a/source/deimos/openssl/ecdsa.d b/source/deimos/openssl/ecdsa.di similarity index 100% rename from source/deimos/openssl/ecdsa.d rename to source/deimos/openssl/ecdsa.di diff --git a/source/deimos/openssl/engine.d b/source/deimos/openssl/engine.di similarity index 100% rename from source/deimos/openssl/engine.d rename to source/deimos/openssl/engine.di diff --git a/source/deimos/openssl/err.d b/source/deimos/openssl/err.di similarity index 100% rename from source/deimos/openssl/err.d rename to source/deimos/openssl/err.di diff --git a/source/deimos/openssl/evp.d b/source/deimos/openssl/evp.di similarity index 100% rename from source/deimos/openssl/evp.d rename to source/deimos/openssl/evp.di diff --git a/source/deimos/openssl/hmac.d b/source/deimos/openssl/hmac.di similarity index 100% rename from source/deimos/openssl/hmac.d rename to source/deimos/openssl/hmac.di diff --git a/source/deimos/openssl/idea.d b/source/deimos/openssl/idea.di similarity index 100% rename from source/deimos/openssl/idea.d rename to source/deimos/openssl/idea.di diff --git a/source/deimos/openssl/kdf.d b/source/deimos/openssl/kdf.di similarity index 100% rename from source/deimos/openssl/kdf.d rename to source/deimos/openssl/kdf.di diff --git a/source/deimos/openssl/krb5_asn.d b/source/deimos/openssl/krb5_asn.di similarity index 100% rename from source/deimos/openssl/krb5_asn.d rename to source/deimos/openssl/krb5_asn.di diff --git a/source/deimos/openssl/kssl.d b/source/deimos/openssl/kssl.di similarity index 99% rename from source/deimos/openssl/kssl.d rename to source/deimos/openssl/kssl.di index 4b6c737..237f96c 100644 --- a/source/deimos/openssl/kssl.d +++ b/source/deimos/openssl/kssl.di @@ -126,7 +126,7 @@ enum KSSL_CLOCKSKEW = 300;; enum KSSL_ERR_MAX = 255; struct kssl_err_st { int reason; - char[KSSL_ERR_MAX+1] text; + char[KSSL_ERR_MAX+1] text = 0; } alias kssl_err_st KSSL_ERR; diff --git a/source/deimos/openssl/lhash.d b/source/deimos/openssl/lhash.di similarity index 100% rename from source/deimos/openssl/lhash.d rename to source/deimos/openssl/lhash.di diff --git a/source/deimos/openssl/md4.d b/source/deimos/openssl/md4.di similarity index 100% rename from source/deimos/openssl/md4.d rename to source/deimos/openssl/md4.di diff --git a/source/deimos/openssl/md5.d b/source/deimos/openssl/md5.di similarity index 100% rename from source/deimos/openssl/md5.d rename to source/deimos/openssl/md5.di diff --git a/source/deimos/openssl/mdc2.d b/source/deimos/openssl/mdc2.di similarity index 100% rename from source/deimos/openssl/mdc2.d rename to source/deimos/openssl/mdc2.di diff --git a/source/deimos/openssl/modes.d b/source/deimos/openssl/modes.di similarity index 100% rename from source/deimos/openssl/modes.d rename to source/deimos/openssl/modes.di diff --git a/source/deimos/openssl/obj_mac.d b/source/deimos/openssl/obj_mac.di similarity index 100% rename from source/deimos/openssl/obj_mac.d rename to source/deimos/openssl/obj_mac.di diff --git a/source/deimos/openssl/objects.d b/source/deimos/openssl/objects.di similarity index 100% rename from source/deimos/openssl/objects.d rename to source/deimos/openssl/objects.di diff --git a/source/deimos/openssl/ocsp.d b/source/deimos/openssl/ocsp.di similarity index 100% rename from source/deimos/openssl/ocsp.d rename to source/deimos/openssl/ocsp.di diff --git a/source/deimos/openssl/opensslconf.d b/source/deimos/openssl/opensslconf.di similarity index 100% rename from source/deimos/openssl/opensslconf.d rename to source/deimos/openssl/opensslconf.di diff --git a/source/deimos/openssl/opensslv.d b/source/deimos/openssl/opensslv.di similarity index 97% rename from source/deimos/openssl/opensslv.d rename to source/deimos/openssl/opensslv.di index 2236934..0f31222 100644 --- a/source/deimos/openssl/opensslv.d +++ b/source/deimos/openssl/opensslv.di @@ -122,7 +122,7 @@ enum OPENSSL_VERSION_PATCH = OpenSSLVersion.patch; enum OPENSSL_VERSION_BUILD = OpenSSLVersion.build; -int OPENSSL_MAKE_VERSION(int major, int minor, int patch, int build) +int OPENSSL_MAKE_VERSION()(int major, int minor, int patch, int build) { return (major << 28) | (minor << 20) | (patch << 12) | (build << 4) | 0xf; } @@ -131,12 +131,12 @@ enum OPENSSL_VERSION_NUMBER = OPENSSL_MAKE_VERSION(OpenSSLVersion.major, OpenSSLVersion.minor, OpenSSLVersion.patch, OpenSSLVersion.build); -bool OPENSSL_VERSION_AT_LEAST(int major, int minor, int patch = 0, int build = 0) +bool OPENSSL_VERSION_AT_LEAST()(int major, int minor, int patch = 0, int build = 0) { return OPENSSL_VERSION_NUMBER >= OPENSSL_MAKE_VERSION(major, minor, patch, build); } -bool OPENSSL_VERSION_BEFORE(int major, int minor, int patch = 0, int build = 0) +bool OPENSSL_VERSION_BEFORE()(int major, int minor, int patch = 0, int build = 0) { return OPENSSL_VERSION_NUMBER < OPENSSL_MAKE_VERSION(major, minor, patch, build); } diff --git a/source/deimos/openssl/ossl_typ.d b/source/deimos/openssl/ossl_typ.di similarity index 100% rename from source/deimos/openssl/ossl_typ.d rename to source/deimos/openssl/ossl_typ.di diff --git a/source/deimos/openssl/pem.d b/source/deimos/openssl/pem.di similarity index 100% rename from source/deimos/openssl/pem.d rename to source/deimos/openssl/pem.di diff --git a/source/deimos/openssl/pem2.d b/source/deimos/openssl/pem2.di similarity index 100% rename from source/deimos/openssl/pem2.d rename to source/deimos/openssl/pem2.di diff --git a/source/deimos/openssl/pkcs12.d b/source/deimos/openssl/pkcs12.di similarity index 100% rename from source/deimos/openssl/pkcs12.d rename to source/deimos/openssl/pkcs12.di diff --git a/source/deimos/openssl/pkcs7.d b/source/deimos/openssl/pkcs7.di similarity index 100% rename from source/deimos/openssl/pkcs7.d rename to source/deimos/openssl/pkcs7.di diff --git a/source/deimos/openssl/pqueue.d b/source/deimos/openssl/pqueue.di similarity index 100% rename from source/deimos/openssl/pqueue.d rename to source/deimos/openssl/pqueue.di diff --git a/source/deimos/openssl/rand.d b/source/deimos/openssl/rand.di similarity index 100% rename from source/deimos/openssl/rand.d rename to source/deimos/openssl/rand.di diff --git a/source/deimos/openssl/rc2.d b/source/deimos/openssl/rc2.di similarity index 100% rename from source/deimos/openssl/rc2.d rename to source/deimos/openssl/rc2.di diff --git a/source/deimos/openssl/rc4.d b/source/deimos/openssl/rc4.di similarity index 100% rename from source/deimos/openssl/rc4.d rename to source/deimos/openssl/rc4.di diff --git a/source/deimos/openssl/ripemd.d b/source/deimos/openssl/ripemd.di similarity index 100% rename from source/deimos/openssl/ripemd.d rename to source/deimos/openssl/ripemd.di diff --git a/source/deimos/openssl/rsa.d b/source/deimos/openssl/rsa.di similarity index 100% rename from source/deimos/openssl/rsa.d rename to source/deimos/openssl/rsa.di diff --git a/source/deimos/openssl/safestack.d b/source/deimos/openssl/safestack.di similarity index 100% rename from source/deimos/openssl/safestack.d rename to source/deimos/openssl/safestack.di diff --git a/source/deimos/openssl/seed.d b/source/deimos/openssl/seed.di similarity index 100% rename from source/deimos/openssl/seed.d rename to source/deimos/openssl/seed.di diff --git a/source/deimos/openssl/sha.d b/source/deimos/openssl/sha.di similarity index 100% rename from source/deimos/openssl/sha.d rename to source/deimos/openssl/sha.di diff --git a/source/deimos/openssl/srp.d b/source/deimos/openssl/srp.di similarity index 100% rename from source/deimos/openssl/srp.d rename to source/deimos/openssl/srp.di diff --git a/source/deimos/openssl/srtp.d b/source/deimos/openssl/srtp.di similarity index 100% rename from source/deimos/openssl/srtp.d rename to source/deimos/openssl/srtp.di diff --git a/source/deimos/openssl/ssl.d b/source/deimos/openssl/ssl.di similarity index 99% rename from source/deimos/openssl/ssl.d rename to source/deimos/openssl/ssl.di index 782d753..1922997 100644 --- a/source/deimos/openssl/ssl.d +++ b/source/deimos/openssl/ssl.di @@ -1830,16 +1830,16 @@ static if (OPENSSL_VERSION_AT_LEAST(1, 1, 0)) enum SSL_CTRL_SET_MIN_PROTO_VERSION = 123; enum SSL_CTRL_SET_MAX_PROTO_VERSION = 124; - auto SSL_CTX_set_min_proto_version(SSL_CTX* ctx, int version_) { + auto SSL_CTX_set_min_proto_version()(SSL_CTX* ctx, int version_) { return SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, version_, null); } - auto SSL_CTX_set_max_proto_version(SSL_CTX* ctx, int version_) { + auto SSL_CTX_set_max_proto_version()(SSL_CTX* ctx, int version_) { return SSL_CTX_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, version_, null); } - auto SSL_set_min_proto_version(SSL* s, int version_) { + auto SSL_set_min_proto_version()(SSL* s, int version_) { return SSL_ctrl(s, SSL_CTRL_SET_MIN_PROTO_VERSION, version_, null); } - auto SSL_set_max_proto_version(SSL* s, int version_) { + auto SSL_set_max_proto_version()(SSL* s, int version_) { return SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version_, null); } @@ -1848,16 +1848,16 @@ static if (OPENSSL_VERSION_AT_LEAST(1, 1, 0)) enum SSL_CTRL_GET_MIN_PROTO_VERSION = 130; enum SSL_CTRL_GET_MAX_PROTO_VERSION = 131; - auto SSL_CTX_get_min_proto_version(SSL_CTX* ctx) { + auto SSL_CTX_get_min_proto_version()(SSL_CTX* ctx) { return SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, null); } - auto SSL_CTX_get_max_proto_version(SSL_CTX* ctx) { + auto SSL_CTX_get_max_proto_version()(SSL_CTX* ctx) { return SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, null); } - auto SSL_get_min_proto_version(SSL* s) { + auto SSL_get_min_proto_version()(SSL* s) { return SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, null); } - auto SSL_get_max_proto_version(SSL* s) { + auto SSL_get_max_proto_version()(SSL* s) { return SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, null); } } diff --git a/source/deimos/openssl/ssl2.d b/source/deimos/openssl/ssl2.di similarity index 100% rename from source/deimos/openssl/ssl2.d rename to source/deimos/openssl/ssl2.di diff --git a/source/deimos/openssl/ssl23.d b/source/deimos/openssl/ssl23.di similarity index 100% rename from source/deimos/openssl/ssl23.d rename to source/deimos/openssl/ssl23.di diff --git a/source/deimos/openssl/ssl3.d b/source/deimos/openssl/ssl3.di similarity index 99% rename from source/deimos/openssl/ssl3.d rename to source/deimos/openssl/ssl3.di index e44fc79..077a5a2 100644 --- a/source/deimos/openssl/ssl3.d +++ b/source/deimos/openssl/ssl3.di @@ -509,7 +509,7 @@ version(OPENSSL_NO_ECDH) {} else { /* used for certificate requests */ int cert_req; int ctype_num; - char[SSL3_CT_NUMBER] ctype; + char[SSL3_CT_NUMBER] ctype = 0; STACK_OF!(X509_NAME) *ca_names; int use_rsa_tmp; @@ -547,7 +547,7 @@ version(OPENSSL_NO_EC) {} else { /* This is set to true if we believe that this is a version of Safari * running on OS X 10.6 or newer. We wish to know this because Safari * on 10.8 .. 10.8.3 has broken ECDHE-ECDSA support. */ - char is_probably_safari; + char is_probably_safari = 0; } /* !OPENSSL_NO_EC */ } /* !OPENSSL_NO_TLSEXT */ } diff --git a/source/deimos/openssl/stack.d b/source/deimos/openssl/stack.di similarity index 100% rename from source/deimos/openssl/stack.d rename to source/deimos/openssl/stack.di diff --git a/source/deimos/openssl/symhacks.d b/source/deimos/openssl/symhacks.di similarity index 100% rename from source/deimos/openssl/symhacks.d rename to source/deimos/openssl/symhacks.di diff --git a/source/deimos/openssl/tls1.d b/source/deimos/openssl/tls1.di similarity index 97% rename from source/deimos/openssl/tls1.d rename to source/deimos/openssl/tls1.di index b6777d2..aa5f3f2 100644 --- a/source/deimos/openssl/tls1.d +++ b/source/deimos/openssl/tls1.di @@ -341,7 +341,7 @@ auto SSL_set_tlsext_status_ocsp_resp()(SSL* ssl, void* arg, void* arglen) { return SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, arg); } -auto SSL_CTX_set_tlsext_servername_callback(SSL_CTX* ctx, ExternC!(void function()) cb) { +auto SSL_CTX_set_tlsext_servername_callback()(SSL_CTX* ctx, ExternC!(void function()) cb) { return SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,cb); } @@ -350,33 +350,33 @@ enum SSL_TLSEXT_ERR_ALERT_WARNING = 1; enum SSL_TLSEXT_ERR_ALERT_FATAL = 2; enum SSL_TLSEXT_ERR_NOACK = 3; -auto SSL_CTX_set_tlsext_servername_arg(SSL_CTX* ctx, void* arg) { +auto SSL_CTX_set_tlsext_servername_arg()(SSL_CTX* ctx, void* arg) { return SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg); } -auto SSL_CTX_get_tlsext_ticket_keys(SSL_CTX* ctx, c_long keylen, void* keys) { +auto SSL_CTX_get_tlsext_ticket_keys()(SSL_CTX* ctx, c_long keylen, void* keys) { return SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys); } -auto SSL_CTX_set_tlsext_ticket_keys(SSL_CTX* ctx, c_long keylen, void* keys) { +auto SSL_CTX_set_tlsext_ticket_keys()(SSL_CTX* ctx, c_long keylen, void* keys) { return SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys); } -auto SSL_CTX_set_tlsext_status_cb(SSL_CTX* ctx, ExternC!(void function()) cb) { +auto SSL_CTX_set_tlsext_status_cb()(SSL_CTX* ctx, ExternC!(void function()) cb) { return SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,cb); } -auto SSL_CTX_set_tlsext_status_arg(SSL_CTX* ctx, void* arg) { +auto SSL_CTX_set_tlsext_status_arg()(SSL_CTX* ctx, void* arg) { return SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg); } -auto SSL_set_tlsext_opaque_prf_input(SSL* s, void* src, c_long len) { +auto SSL_set_tlsext_opaque_prf_input()(SSL* s, void* src, c_long len) { return SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src); } -auto SSL_CTX_set_tlsext_opaque_prf_input_callback(SSL_CTX* ctx, ExternC!(void function()) cb) { +auto SSL_CTX_set_tlsext_opaque_prf_input_callback()(SSL_CTX* ctx, ExternC!(void function()) cb) { return SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, cb); } -auto SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(SSL_CTX* ctx, void* arg) { +auto SSL_CTX_set_tlsext_opaque_prf_input_callback_arg()(SSL_CTX* ctx, void* arg) { return SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg); } diff --git a/source/deimos/openssl/ts.d b/source/deimos/openssl/ts.di similarity index 100% rename from source/deimos/openssl/ts.d rename to source/deimos/openssl/ts.di diff --git a/source/deimos/openssl/txt_db.d b/source/deimos/openssl/txt_db.di similarity index 100% rename from source/deimos/openssl/txt_db.d rename to source/deimos/openssl/txt_db.di diff --git a/source/deimos/openssl/types.d b/source/deimos/openssl/types.di similarity index 100% rename from source/deimos/openssl/types.d rename to source/deimos/openssl/types.di diff --git a/source/deimos/openssl/ui.d b/source/deimos/openssl/ui.di similarity index 99% rename from source/deimos/openssl/ui.d rename to source/deimos/openssl/ui.di index be2c978..770366d 100644 --- a/source/deimos/openssl/ui.d +++ b/source/deimos/openssl/ui.di @@ -1,4 +1,3 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2001. */ diff --git a/source/deimos/openssl/ui_compat.d b/source/deimos/openssl/ui_compat.di similarity index 98% rename from source/deimos/openssl/ui_compat.d rename to source/deimos/openssl/ui_compat.di index 36e300c..96dda92 100644 --- a/source/deimos/openssl/ui_compat.d +++ b/source/deimos/openssl/ui_compat.di @@ -1,4 +1,3 @@ -/* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2001. */ diff --git a/source/deimos/openssl/whrlpool.d b/source/deimos/openssl/whrlpool.di similarity index 100% rename from source/deimos/openssl/whrlpool.d rename to source/deimos/openssl/whrlpool.di diff --git a/source/deimos/openssl/x509.d b/source/deimos/openssl/x509.di similarity index 100% rename from source/deimos/openssl/x509.d rename to source/deimos/openssl/x509.di diff --git a/source/deimos/openssl/x509_vfy.d b/source/deimos/openssl/x509_vfy.di similarity index 100% rename from source/deimos/openssl/x509_vfy.d rename to source/deimos/openssl/x509_vfy.di diff --git a/source/deimos/openssl/x509v3.d b/source/deimos/openssl/x509v3.di similarity index 100% rename from source/deimos/openssl/x509v3.d rename to source/deimos/openssl/x509v3.di