openssl: Make some additional arguments const
authorThomas Egerer <thomas.egerer@secunet.com>
Fri, 29 Nov 2019 18:05:37 +0000 (19:05 +0100)
committerThomas Egerer <thomas.egerer@secunet.com>
Wed, 11 Dec 2019 12:09:04 +0000 (13:09 +0100)
Related to openssl 1.1.x changes.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
src/libstrongswan/plugins/openssl/openssl_util.c
src/libstrongswan/plugins/openssl/openssl_util.h

index f99dcd6..ac6784a 100644 (file)
@@ -153,7 +153,7 @@ bool openssl_bn2chunk(const BIGNUM *bn, chunk_t *chunk)
 /**
  * Described in header.
  */
-chunk_t openssl_asn1_obj2chunk(ASN1_OBJECT *asn1)
+chunk_t openssl_asn1_obj2chunk(const ASN1_OBJECT *asn1)
 {
        if (asn1)
        {
@@ -206,7 +206,7 @@ time_t asn1_to_time(chunk_t *,int);
 /**
  * Described in header.
  */
-int openssl_asn1_known_oid(ASN1_OBJECT *obj)
+int openssl_asn1_known_oid(const ASN1_OBJECT *obj)
 {
        return asn1_known_oid(openssl_asn1_obj2chunk(obj));
 }
index 4afe76b..47414c6 100644 (file)
@@ -101,7 +101,7 @@ bool openssl_bn2chunk(const BIGNUM *bn, chunk_t *chunk);
  * @param asn1         asn1 object to convert
  * @return                     chunk, pointing into asn1 object
  */
-chunk_t openssl_asn1_obj2chunk(ASN1_OBJECT *asn1);
+chunk_t openssl_asn1_obj2chunk(const ASN1_OBJECT *asn1);
 
 /**
  * Convert an OpenSSL ASN1_STRING to a chunk.
@@ -125,7 +125,7 @@ identification_t *openssl_x509_name2id(X509_NAME *name);
  * @param obj          openssl ASN1 object
  * @returns                    OID, as defined in <asn1/oid.h>
  */
-int openssl_asn1_known_oid(ASN1_OBJECT *obj);
+int openssl_asn1_known_oid(const ASN1_OBJECT *obj);
 
 /**
  * Convert an OpenSSL ASN1_TIME to a time_t.