From 63a70a9c2490fec43b63b00275296730b8b8293d Mon Sep 17 00:00:00 2001
From: Nicola Di Lieto <nicola.dilieto@gmail.com>
Date: Thu, 28 Jul 2022 08:08:58 +0200
Subject: [PATCH] Compatibility wth LibreSSL

fix https://github.com/ndilieto/uacme/commit/32546c7caa1626bbef860cf81e53d10e29fca5cb#commitcomment-79601040
---
 crypto.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto.c b/crypto.c
index de9e93b..5adcfa9 100644
--- a/crypto.c
+++ b/crypto.c
@@ -2349,7 +2349,7 @@ char *csr_gen(char * const *names, bool status_req, privkey_t key)
         warnx("csr_gen: -m, --must-staple is not supported by LibreSSL "
                 "- consider recompiling with OpenSSL");
         goto out;
-#endif
+#else
         ext = X509V3_EXT_conf_nid(NULL, NULL, NID_tlsfeature,
                 "status_request");
         if (!ext) {
@@ -2357,6 +2357,7 @@ char *csr_gen(char * const *names, bool status_req, privkey_t key)
             goto out;
         }
         sk_X509_EXTENSION_push(exts, ext);
+#endif
     }
     if (!X509_REQ_add_extensions(crq, exts)) {
         openssl_error("csr_gen");
