summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3/v3_cpols.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2004-03-31 12:17:24 +0000
committerDr. Stephen Henson <steve@openssl.org>2004-03-31 12:17:24 +0000
commitecf139917dd7a4671a4bb1bf530f3b0ab5bb3bf1 (patch)
tree19efaf8075b512ceb068fbcca0916e9a52738113 /crypto/x509v3/v3_cpols.c
parentab23d5ffda681e639485e9b1fce795975a48903b (diff)
New function X509_POLICY_NODE_print()
Diffstat (limited to 'crypto/x509v3/v3_cpols.c')
-rw-r--r--crypto/x509v3/v3_cpols.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index 0d554f3a2c..62b34e1f99 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -3,7 +3,7 @@
* project 1999.
*/
/* ====================================================================
- * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -63,6 +63,8 @@
#include <openssl/asn1t.h>
#include <openssl/x509v3.h>
+#include "pcy_int.h"
+
/* Certificate policies extension support: this one is a bit complex... */
static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol, BIO *out, int indent);
@@ -420,3 +422,19 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent)
notice->exptext->data);
}
+void X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent)
+ {
+ const X509_POLICY_DATA *dat = node->data;
+
+ BIO_printf(out, "%*sPolicy: ", indent, "");
+
+ i2a_ASN1_OBJECT(out, dat->valid_policy);
+ BIO_puts(out, "\n");
+ BIO_printf(out, "%*s%s\n", indent + 2, "",
+ node_data_critical(dat) ? "Critical" : "Non Critical");
+ if (dat->qualifier_set)
+ print_qualifiers(out, dat->qualifier_set, indent + 2);
+ else
+ BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, "");
+ }
+