diff options
author | Andy Polyakov <appro@openssl.org> | 2009-12-30 11:46:54 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2009-12-30 11:46:54 +0000 |
commit | f87e3078751ce04493f497c195d3b3547b0cf1e0 (patch) | |
tree | 4c25a97f4d8b7d53b2ffa65a4e7fc4d536810724 /engines/e_capi.c | |
parent | 70b76d392fdfe192843c1a1f56389ffd1f493425 (diff) |
Adapt mingw config for newer mingw environment. Note modified conditional
compilation in e_capi.c.
PR: 2113
Diffstat (limited to 'engines/e_capi.c')
-rw-r--r-- | engines/e_capi.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/e_capi.c b/engines/e_capi.c index fd7f13ca2c..8da67982b0 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -71,6 +71,22 @@ #include <wincrypt.h> +/* + * This module uses several "new" interfaces, among which is + * CertGetCertificateContextProperty. CERT_KEY_PROV_INFO_PROP_ID is + * one of possible values you can pass to function in question. By + * checking if it's defined we can see if wincrypt.h and accompanying + * crypt32.lib are in shape. Yes, it's rather "weak" test and if + * compilation fails, then re-configure with -DOPENSSL_NO_CAPIENG. + */ +#ifdef CERT_KEY_PROV_INFO_PROP_ID +# define __COMPILE_CAPIENG +#endif /* CERT_KEY_PROV_INFO_PROP_ID */ +#endif /* OPENSSL_NO_CAPIENG */ +#endif /* OPENSSL_SYS_WIN32 */ + +#ifdef __COMPILE_CAPIENG + #undef X509_EXTENSIONS #undef X509_CERT_PAIR @@ -1784,12 +1800,13 @@ static int cert_select_dialog(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs) } #endif -#endif -#else /* !WIN32 */ +#else /* !__COMPILE_CAPIENG */ #include <openssl/engine.h> #ifndef OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_EXPORT int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; } IMPLEMENT_DYNAMIC_CHECK_FN() +#else +void ENGINE_load_capi(void){} #endif #endif |