diff options
author | djm <> | 2008-09-06 12:17:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:17:54 +0000 |
commit | 38ce604e3cc97706b876b0525ddff0121115456d (patch) | |
tree | 7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/x509v3/v3_cpols.c | |
parent | 12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff) | |
download | openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2 openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_cpols.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_cpols.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_cpols.c b/src/lib/libcrypto/x509v3/v3_cpols.c index 867525f336..a40f490aa9 100644 --- a/src/lib/libcrypto/x509v3/v3_cpols.c +++ b/src/lib/libcrypto/x509v3/v3_cpols.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
@@ -63,6 +63,8 @@ | |||
63 | #include <openssl/asn1t.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | #include "pcy_int.h" | ||
67 | |||
66 | /* Certificate policies extension support: this one is a bit complex... */ | 68 | /* Certificate policies extension support: this one is a bit complex... */ |
67 | 69 | ||
68 | static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol, BIO *out, int indent); | 70 | static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol, BIO *out, int indent); |
@@ -75,7 +77,7 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, | |||
75 | STACK_OF(CONF_VALUE) *unot, int ia5org); | 77 | STACK_OF(CONF_VALUE) *unot, int ia5org); |
76 | static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos); | 78 | static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos); |
77 | 79 | ||
78 | X509V3_EXT_METHOD v3_cpols = { | 80 | const X509V3_EXT_METHOD v3_cpols = { |
79 | NID_certificate_policies, 0,ASN1_ITEM_ref(CERTIFICATEPOLICIES), | 81 | NID_certificate_policies, 0,ASN1_ITEM_ref(CERTIFICATEPOLICIES), |
80 | 0,0,0,0, | 82 | 0,0,0,0, |
81 | 0,0, | 83 | 0,0, |
@@ -348,7 +350,7 @@ static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos) | |||
348 | return 1; | 350 | return 1; |
349 | 351 | ||
350 | merr: | 352 | merr: |
351 | X509V3err(X509V3_F_NOTICE_SECTION,ERR_R_MALLOC_FAILURE); | 353 | X509V3err(X509V3_F_NREF_NOS,ERR_R_MALLOC_FAILURE); |
352 | 354 | ||
353 | err: | 355 | err: |
354 | sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free); | 356 | sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free); |
@@ -429,3 +431,19 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent) | |||
429 | notice->exptext->data); | 431 | notice->exptext->data); |
430 | } | 432 | } |
431 | 433 | ||
434 | void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent) | ||
435 | { | ||
436 | const X509_POLICY_DATA *dat = node->data; | ||
437 | |||
438 | BIO_printf(out, "%*sPolicy: ", indent, ""); | ||
439 | |||
440 | i2a_ASN1_OBJECT(out, dat->valid_policy); | ||
441 | BIO_puts(out, "\n"); | ||
442 | BIO_printf(out, "%*s%s\n", indent + 2, "", | ||
443 | node_data_critical(dat) ? "Critical" : "Non Critical"); | ||
444 | if (dat->qualifier_set) | ||
445 | print_qualifiers(out, dat->qualifier_set, indent + 2); | ||
446 | else | ||
447 | BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, ""); | ||
448 | } | ||
449 | |||