From c02ce0e16590c25c8a16068bd155911a0a149cf1 Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Thu, 20 Aug 2020 21:31:46 +0200
Subject: [PATCH] Remove 'const' from set_x509_ext()'s value parameter

Silences the following warning when compiling with OpenSSL 1.0.2t.

     openssl.c:1213:47: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        ext = X509V3_EXT_conf_nid(NULL, &ctx, nid, value);
                                                   ^~~~~
     /usr/include/openssl/x509v3.h:627:43: note: passing argument to parameter 'value' here
                                         char *value);
                                               ^
Sponsored by: Robert Klemme
---
 openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openssl.c b/openssl.c
index e450412c..5bf3f1a7 100644
--- a/openssl.c
+++ b/openssl.c
@@ -1523,7 +1523,7 @@ static int ssl_certificate_is_invalid(const char *cert_file)
  *                 1 => It worked
  *
  *********************************************************************/
-static int set_x509_ext(X509 *cert, X509 *issuer, int nid, const char *value)
+static int set_x509_ext(X509 *cert, X509 *issuer, int nid, char *value)
 {
    X509_EXTENSION *ext = NULL;
    X509V3_CTX ctx;
-- 
2.49.0