| Index: openssl/engines/e_capi.c
|
| ===================================================================
|
| --- openssl/engines/e_capi.c (revision 105093)
|
| +++ openssl/engines/e_capi.c (working copy)
|
| @@ -71,6 +71,28 @@
|
|
|
| #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. The native MingW32 headers up to and
|
| + * including __W32API_VERSION 3.14 lack of struct DSSPUBKEY and the
|
| + * defines CERT_STORE_PROV_SYSTEM_A and CERT_STORE_READONLY_FLAG,
|
| + * so we check for these too and avoid compiling.
|
| + * Yes, it's rather "weak" test and if compilation fails,
|
| + * then re-configure with -DOPENSSL_NO_CAPIENG.
|
| + */
|
| +#if defined(CERT_KEY_PROV_INFO_PROP_ID) && \
|
| + defined(CERT_STORE_PROV_SYSTEM_A) && \
|
| + defined(CERT_STORE_READONLY_FLAG)
|
| +# 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
|
|
|
| @@ -1788,12 +1810,15 @@
|
| }
|
| #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);
|
| +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
|
|
|