From 90dd2437b23e9f2f8afa3dfb59dcafeb071f0dd5 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 18 Oct 2014 15:03:29 -0500 Subject: start adding NIDs we'll need for X509 --- cryptography/hazmat/bindings/openssl/nid.py | 44 ++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/cryptography/hazmat/bindings/openssl/nid.py b/cryptography/hazmat/bindings/openssl/nid.py index 133d2ca4..add2a616 100644 --- a/cryptography/hazmat/bindings/openssl/nid.py +++ b/cryptography/hazmat/bindings/openssl/nid.py @@ -13,7 +13,9 @@ from __future__ import absolute_import, division, print_function -INCLUDES = "" +INCLUDES = """ +#include +""" TYPES = """ static const int Cryptography_HAS_ECDSA_SHA2_NIDS; @@ -39,10 +41,7 @@ static const int NID_ecdsa_with_SHA224; static const int NID_ecdsa_with_SHA256; static const int NID_ecdsa_with_SHA384; static const int NID_ecdsa_with_SHA512; -static const int NID_crl_reason; static const int NID_pbe_WithSHA1And3_Key_TripleDES_CBC; -static const int NID_subject_alt_name; -static const int NID_issuer_alt_name; static const int NID_X9_62_c2pnb163v1; static const int NID_X9_62_c2pnb163v2; static const int NID_X9_62_c2pnb163v3; @@ -185,6 +184,35 @@ static const char *const SN_wap_wsg_idm_ecid_wtls11; static const char *const SN_wap_wsg_idm_ecid_wtls12; static const char *const SN_ipsec3; static const char *const SN_ipsec4; + +static const int NID_subject_key_identifier; +static const int NID_authority_key_identifier; +static const int NID_policy_constraints; +static const int NID_ext_key_usage; +static const int NID_info_access; +static const int NID_key_usage; +static const int NID_subject_alt_name; +static const int NID_issuer_alt_name; +static const int NID_basic_constraints; +static const int NID_issuing_distribution_point; +static const int NID_certificate_issuer; +static const int NID_name_constraints; +static const int NID_crl_distribution_points; +static const int NID_certificate_policies; +static const int NID_inhibit_any_policy; +static const int NID_id_pkix_OCSP_noCheck; + +static const int NID_private_key_usage_period; +static const int NID_crl_number; +static const int NID_crl_reason; +static const int NID_invalidity_date; +static const int NID_delta_crl; +static const int NID_any_policy; +static const int NID_policy_mappings; +static const int NID_freshest_crl; +static const int NID_target_information; +static const int NID_no_rev_avail; +static const int NID_anyExtendedKeyUsage; """ FUNCTIONS = """ @@ -204,6 +232,14 @@ static const int NID_ecdsa_with_SHA256 = 0; static const int NID_ecdsa_with_SHA384 = 0; static const int NID_ecdsa_with_SHA512 = 0; #endif + +#ifndef NID_id_pkix_OCSP_noCheck +static const int NID_id_pkix_OCSP_noCheck = 369; +#endif + +#ifndef NID_anyExtendedKeyUsage +static const int NID_anyExtendedKeyUsage = 910; +#endif """ CONDITIONAL_NAMES = { -- cgit v1.2.3 From 375e3ab6c05d3ef23604d2b6acff65071217b0a2 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 18 Oct 2014 15:21:21 -0500 Subject: compilation fixes --- cryptography/hazmat/bindings/openssl/nid.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cryptography/hazmat/bindings/openssl/nid.py b/cryptography/hazmat/bindings/openssl/nid.py index add2a616..8938ada2 100644 --- a/cryptography/hazmat/bindings/openssl/nid.py +++ b/cryptography/hazmat/bindings/openssl/nid.py @@ -209,7 +209,6 @@ static const int NID_invalidity_date; static const int NID_delta_crl; static const int NID_any_policy; static const int NID_policy_mappings; -static const int NID_freshest_crl; static const int NID_target_information; static const int NID_no_rev_avail; static const int NID_anyExtendedKeyUsage; @@ -234,11 +233,11 @@ static const int NID_ecdsa_with_SHA512 = 0; #endif #ifndef NID_id_pkix_OCSP_noCheck -static const int NID_id_pkix_OCSP_noCheck = 369; +static const long NID_id_pkix_OCSP_noCheck = 369; #endif #ifndef NID_anyExtendedKeyUsage -static const int NID_anyExtendedKeyUsage = 910; +static const long NID_anyExtendedKeyUsage = 910; #endif """ -- cgit v1.2.3 From 13d64e093894aca90062feac6db264e17e654e4d Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 19 Oct 2014 16:05:37 -0700 Subject: remove nids not universally available in all our versions will re-add later with additional boilerplate --- cryptography/hazmat/bindings/openssl/nid.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cryptography/hazmat/bindings/openssl/nid.py b/cryptography/hazmat/bindings/openssl/nid.py index 8938ada2..b2e61492 100644 --- a/cryptography/hazmat/bindings/openssl/nid.py +++ b/cryptography/hazmat/bindings/openssl/nid.py @@ -200,7 +200,6 @@ static const int NID_name_constraints; static const int NID_crl_distribution_points; static const int NID_certificate_policies; static const int NID_inhibit_any_policy; -static const int NID_id_pkix_OCSP_noCheck; static const int NID_private_key_usage_period; static const int NID_crl_number; @@ -211,7 +210,6 @@ static const int NID_any_policy; static const int NID_policy_mappings; static const int NID_target_information; static const int NID_no_rev_avail; -static const int NID_anyExtendedKeyUsage; """ FUNCTIONS = """ @@ -231,14 +229,6 @@ static const int NID_ecdsa_with_SHA256 = 0; static const int NID_ecdsa_with_SHA384 = 0; static const int NID_ecdsa_with_SHA512 = 0; #endif - -#ifndef NID_id_pkix_OCSP_noCheck -static const long NID_id_pkix_OCSP_noCheck = 369; -#endif - -#ifndef NID_anyExtendedKeyUsage -static const long NID_anyExtendedKeyUsage = 910; -#endif """ CONDITIONAL_NAMES = { -- cgit v1.2.3