Add -Wundef to --strict-warnings options.
[openssl.git] / crypto / x509 / x509_ext.c
index 9e6fa6b5a5fd7850399af553faea35ba9fa5b2b7..3c59079852f59d084eaac95e7da01386e1d47715 100644 (file)
@@ -8,8 +8,8 @@
  */
 
 #include <stdio.h>
-#include <openssl/stack.h>
 #include "internal/cryptlib.h"
+#include <openssl/stack.h>
 #include <openssl/asn1.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
@@ -27,7 +27,8 @@ int X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos)
     return (X509v3_get_ext_by_NID(x->crl.extensions, nid, lastpos));
 }
 
-int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, ASN1_OBJECT *obj, int lastpos)
+int X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj,
+                            int lastpos)
 {
     return (X509v3_get_ext_by_OBJ(x->crl.extensions, obj, lastpos));
 }
@@ -37,7 +38,7 @@ int X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos)
     return (X509v3_get_ext_by_critical(x->crl.extensions, crit, lastpos));
 }
 
-X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc)
+X509_EXTENSION *X509_CRL_get_ext(const X509_CRL *x, int loc)
 {
     return (X509v3_get_ext(x->crl.extensions, loc));
 }
@@ -73,7 +74,7 @@ int X509_get_ext_by_NID(const X509 *x, int nid, int lastpos)
     return (X509v3_get_ext_by_NID(x->cert_info.extensions, nid, lastpos));
 }
 
-int X509_get_ext_by_OBJ(const X509 *x, ASN1_OBJECT *obj, int lastpos)
+int X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos)
 {
     return (X509v3_get_ext_by_OBJ(x->cert_info.extensions, obj, lastpos));
 }
@@ -84,7 +85,7 @@ int X509_get_ext_by_critical(const X509 *x, int crit, int lastpos)
             (x->cert_info.extensions, crit, lastpos));
 }
 
-X509_EXTENSION *X509_get_ext(X509 *x, int loc)
+X509_EXTENSION *X509_get_ext(const X509 *x, int loc)
 {
     return (X509v3_get_ext(x->cert_info.extensions, loc));
 }
@@ -121,7 +122,7 @@ int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos)
     return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos));
 }
 
-int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, ASN1_OBJECT *obj,
+int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj,
                                 int lastpos)
 {
     return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos));
@@ -132,7 +133,7 @@ int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpo
     return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos));
 }
 
-X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc)
+X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc)
 {
     return (X509v3_get_ext(x->extensions, loc));
 }