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
commit321a20d0a06980e029ce8bcdf37b4df1ff3c31d8 (patch)
tree75b208133b3a7fbeb57237a5639552556d1bc38e /src/lib/libcrypto/x509/x509_cpols.c
parent0b0f4ed92e8f424576b536f2fee78a21d2cca3e3 (diff)
downloadopenbsd-321a20d0a06980e029ce8bcdf37b4df1ff3c31d8.tar.gz
openbsd-321a20d0a06980e029ce8bcdf37b4df1ff3c31d8.tar.bz2
openbsd-321a20d0a06980e029ce8bcdf37b4df1ff3c31d8.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