summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_cpols.c
diff options
context:
space:
mode:
authorbeck <>2023-04-26 19:11:33 +0000
committerbeck <>2023-04-26 19:11:33 +0000
commitd2576ff178ab71d730ed11f6d244e0035b9203c2 (patch)
tree75b208133b3a7fbeb57237a5639552556d1bc38e /src/lib/libcrypto/x509/x509_cpols.c
parent044e73e94f288a201e6ef15bb65075250510d821 (diff)
downloadopenbsd-d2576ff178ab71d730ed11f6d244e0035b9203c2.tar.gz
openbsd-d2576ff178ab71d730ed11f6d244e0035b9203c2.tar.bz2
openbsd-d2576ff178ab71d730ed11f6d244e0035b9203c2.zip
Make the new policy code in x509_policy.c to be selectable at compile time.
The old policy codes remains the default, with the new policy code selectable by defining LIBRESSL_HAS_POLICY_DAG. ok tb@ jsing@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_cpols.c')
-rw-r--r--src/lib/libcrypto/x509/x509_cpols.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_cpols.c b/src/lib/libcrypto/x509/x509_cpols.c
index af8f16c9b0..bac0209371 100644
--- a/src/lib/libcrypto/x509/x509_cpols.c
+++ b/src/lib/libcrypto/x509/x509_cpols.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_cpols.c,v 1.8 2023/04/20 18:29:08 tb Exp $ */ 1/* $OpenBSD: x509_cpols.c,v 1.9 2023/04/26 19:11:33 beck Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -65,7 +65,9 @@
65#include <openssl/err.h> 65#include <openssl/err.h>
66#include <openssl/x509v3.h> 66#include <openssl/x509v3.h>
67 67
68#ifndef LIBRESSL_HAS_POLICY_DAG
68#include "pcy_int.h" 69#include "pcy_int.h"
70#endif
69#include "x509_local.h" 71#include "x509_local.h"
70 72
71/* Certificate policies extension support: this one is a bit complex... */ 73/* Certificate policies extension support: this one is a bit complex... */
@@ -766,6 +768,7 @@ print_notice(BIO *out, USERNOTICE *notice, int indent)
766 notice->exptext->length, notice->exptext->data); 768 notice->exptext->length, notice->exptext->data);
767} 769}
768 770
771#ifndef LIBRESSL_HAS_POLICY_DAG
769void 772void
770X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent) 773X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent)
771{ 774{
@@ -783,3 +786,4 @@ X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent)
783 BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, ""); 786 BIO_printf(out, "%*sNo Qualifiers\n", indent + 2, "");
784} 787}
785LCRYPTO_ALIAS(X509_POLICY_NODE_print); 788LCRYPTO_ALIAS(X509_POLICY_NODE_print);
789#endif