Author: Matti Picus <[email protected]>
Branch:
Changeset: r97183:0cbabb9554cd
Date: 2019-08-15 15:54 +0300
http://bitbucket.org/pypy/pypy/changeset/0cbabb9554cd/
Log: add more missing things from cryptography, remove offending macro
from build
diff --git a/lib_pypy/_cffi_ssl/_cffi_src/openssl/nid.py
b/lib_pypy/_cffi_ssl/_cffi_src/openssl/nid.py
--- a/lib_pypy/_cffi_ssl/_cffi_src/openssl/nid.py
+++ b/lib_pypy/_cffi_ssl/_cffi_src/openssl/nid.py
@@ -23,6 +23,7 @@
static const int NID_ED448;
static const int NID_poly1305;
+static const int NID_X9_62_prime256v1;
static const int NID_info_access;
static const int NID_subject_alt_name;
static const int NID_crl_distribution_points;
diff --git a/lib_pypy/_cffi_ssl/_cffi_src/openssl/pypy_win32_extra.py
b/lib_pypy/_cffi_ssl/_cffi_src/openssl/pypy_win32_extra.py
new file mode 100644
--- /dev/null
+++ b/lib_pypy/_cffi_ssl/_cffi_src/openssl/pypy_win32_extra.py
@@ -0,0 +1,84 @@
+#
+# An extra bit of logic for the Win32-only functionality that is missing from
the
+# version from cryptography.
+#
+
+import sys
+
+INCLUDES = """
+#include <Wincrypt.h>
+"""
+
+TYPES = """
+typedef ... *HCERTSTORE;
+typedef ... *HCRYPTPROV_LEGACY;
+
+typedef struct {
+ DWORD dwCertEncodingType;
+ BYTE *pbCertEncoded;
+ DWORD cbCertEncoded;
+ ...;
+} CERT_CONTEXT, *PCCERT_CONTEXT;
+
+typedef struct {
+ DWORD dwCertEncodingType;
+ BYTE *pbCrlEncoded;
+ DWORD cbCrlEncoded;
+ ...;
+} CRL_CONTEXT, *PCCRL_CONTEXT;
+
+typedef struct {
+ DWORD cUsageIdentifier;
+ LPSTR *rgpszUsageIdentifier;
+ ...;
+} CERT_ENHKEY_USAGE, *PCERT_ENHKEY_USAGE;
+"""
+
+FUNCTIONS = """
+HCERTSTORE WINAPI CertOpenStore(
+ LPCSTR lpszStoreProvider,
+ DWORD dwMsgAndCertEncodingType,
+ HCRYPTPROV_LEGACY hCryptProv,
+ DWORD dwFlags,
+ const char *pvPara
+);
+PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(
+ HCERTSTORE hCertStore,
+ PCCERT_CONTEXT pPrevCertContext
+);
+BOOL WINAPI CertFreeCertificateContext(
+ PCCERT_CONTEXT pCertContext
+);
+BOOL WINAPI CertFreeCRLContext(
+ PCCRL_CONTEXT pCrlContext
+);
+BOOL WINAPI CertCloseStore(
+ HCERTSTORE hCertStore,
+ DWORD dwFlags
+);
+BOOL WINAPI CertGetEnhancedKeyUsage(
+ PCCERT_CONTEXT pCertContext,
+ DWORD dwFlags,
+ PCERT_ENHKEY_USAGE pUsage,
+ DWORD *pcbUsage
+);
+PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(
+ HCERTSTORE hCertStore,
+ PCCRL_CONTEXT pPrevCrlContext
+);
+"""
+
+MACROS = """
+#define CERT_STORE_READONLY_FLAG ...
+#define CERT_SYSTEM_STORE_LOCAL_MACHINE ...
+#define CRYPT_E_NOT_FOUND ...
+#define CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG ...
+#define CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG ...
+#define X509_ASN_ENCODING ...
+#define PKCS_7_ASN_ENCODING ...
+
+static const LPCSTR CERT_STORE_PROV_SYSTEM_A;
+"""
+
+CUSTOMIZATIONS = """
+"""
diff --git a/lib_pypy/_ssl_build.py b/lib_pypy/_ssl_build.py
--- a/lib_pypy/_ssl_build.py
+++ b/lib_pypy/_ssl_build.py
@@ -53,7 +53,6 @@
"callbacks",
] + pypy_win32_extra,
libraries=_get_openssl_libraries(sys.platform),
- extra_compile_args=['-DOPENSSL_NO_SSL3_METHOD'],
extra_link_args=extra_link_args(compiler_type()),
)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit