diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_purp.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_purp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c index b7494ebcd5..5594a1d64f 100644 --- a/src/lib/libcrypto/x509v3/v3_purp.c +++ b/src/lib/libcrypto/x509v3/v3_purp.c | |||
@@ -71,6 +71,7 @@ static int purpose_smime(X509 *x, int ca); | |||
71 | static int check_purpose_smime_sign(X509_PURPOSE *xp, X509 *x, int ca); | 71 | static int check_purpose_smime_sign(X509_PURPOSE *xp, X509 *x, int ca); |
72 | static int check_purpose_smime_encrypt(X509_PURPOSE *xp, X509 *x, int ca); | 72 | static int check_purpose_smime_encrypt(X509_PURPOSE *xp, X509 *x, int ca); |
73 | static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca); | 73 | static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca); |
74 | static int no_check(X509_PURPOSE *xp, X509 *x, int ca); | ||
74 | 75 | ||
75 | static int xp_cmp(X509_PURPOSE **a, X509_PURPOSE **b); | 76 | static int xp_cmp(X509_PURPOSE **a, X509_PURPOSE **b); |
76 | static void xptable_free(X509_PURPOSE *p); | 77 | static void xptable_free(X509_PURPOSE *p); |
@@ -81,7 +82,8 @@ static X509_PURPOSE xstandard[] = { | |||
81 | {X509_PURPOSE_NS_SSL_SERVER, X509_TRUST_SSL_SERVER, 0, check_purpose_ns_ssl_server, "Netscape SSL server", "nssslserver", NULL}, | 82 | {X509_PURPOSE_NS_SSL_SERVER, X509_TRUST_SSL_SERVER, 0, check_purpose_ns_ssl_server, "Netscape SSL server", "nssslserver", NULL}, |
82 | {X509_PURPOSE_SMIME_SIGN, X509_TRUST_EMAIL, 0, check_purpose_smime_sign, "S/MIME signing", "smimesign", NULL}, | 83 | {X509_PURPOSE_SMIME_SIGN, X509_TRUST_EMAIL, 0, check_purpose_smime_sign, "S/MIME signing", "smimesign", NULL}, |
83 | {X509_PURPOSE_SMIME_ENCRYPT, X509_TRUST_EMAIL, 0, check_purpose_smime_encrypt, "S/MIME encryption", "smimeencrypt", NULL}, | 84 | {X509_PURPOSE_SMIME_ENCRYPT, X509_TRUST_EMAIL, 0, check_purpose_smime_encrypt, "S/MIME encryption", "smimeencrypt", NULL}, |
84 | {X509_PURPOSE_CRL_SIGN, X509_TRUST_ANY, 0, check_purpose_crl_sign, "CRL signing", "crlsign", NULL}, | 85 | {X509_PURPOSE_CRL_SIGN, X509_TRUST_COMPAT, 0, check_purpose_crl_sign, "CRL signing", "crlsign", NULL}, |
86 | {X509_PURPOSE_ANY, X509_TRUST_DEFAULT, 0, no_check, "Any Purpose", "any", NULL}, | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | #define X509_PURPOSE_COUNT (sizeof(xstandard)/sizeof(X509_PURPOSE)) | 89 | #define X509_PURPOSE_COUNT (sizeof(xstandard)/sizeof(X509_PURPOSE)) |
@@ -454,3 +456,8 @@ static int check_purpose_crl_sign(X509_PURPOSE *xp, X509 *x, int ca) | |||
454 | if(ku_reject(x, KU_CRL_SIGN)) return 0; | 456 | if(ku_reject(x, KU_CRL_SIGN)) return 0; |
455 | return 1; | 457 | return 1; |
456 | } | 458 | } |
459 | |||
460 | static int no_check(X509_PURPOSE *xp, X509 *x, int ca) | ||
461 | { | ||
462 | return 1; | ||
463 | } | ||