Remove 'const' from set_x509_ext()'s value parameter
authorFabian Keil <fk@fabiankeil.de>
Thu, 20 Aug 2020 19:31:46 +0000 (21:31 +0200)
committerFabian Keil <fk@fabiankeil.de>
Tue, 1 Sep 2020 10:22:42 +0000 (12:22 +0200)
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

index e450412..5bf3f1a 100644 (file)
--- a/openssl.c
+++ b/openssl.c
@@ -1523,7 +1523,7 @@ static int ssl_certificate_is_invalid(const char *cert_file)
  *                 1 => It worked
  *
  *********************************************************************/
  *                 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;
 {
    X509_EXTENSION *ext = NULL;
    X509V3_CTX ctx;