Constify input buffer
[openssl.git] / include / openssl / x509.h
index e68d4b366cfe754472b4f96a926ea42647ce95e0..2abc138fbe71e92b5c1e17a3193f636b03994e55 100644 (file)
@@ -638,9 +638,9 @@ EVP_PKEY *X509_get_pubkey(X509 *x);
 ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);
 int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );
 
-long X509_REQ_get_version(X509_REQ *req);
+long X509_REQ_get_version(const X509_REQ *req);
 int X509_REQ_set_version(X509_REQ *x, long version);
-X509_NAME *X509_REQ_get_subject_name(X509_REQ *req);
+X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
 int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
 void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
                              X509_REQ *req);
@@ -681,10 +681,10 @@ int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
 int X509_CRL_sort(X509_CRL *crl);
 int X509_CRL_up_ref(X509_CRL *crl);
 
-long X509_CRL_get_version(X509_CRL *crl);
-ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl);
-ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl);
-X509_NAME *X509_CRL_get_issuer(X509_CRL *crl);
+long X509_CRL_get_version(const X509_CRL *crl);
+ASN1_TIME *X509_CRL_get_lastUpdate(const X509_CRL *crl);
+ASN1_TIME *X509_CRL_get_nextUpdate(const X509_CRL *crl);
+X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
 STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(X509_CRL *crl);
 STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
 void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
@@ -771,17 +771,18 @@ X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
 int X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,
                         int loc, int set);
 int X509_NAME_add_entry_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj, int type,
-                               unsigned char *bytes, int len, int loc,
+                               const unsigned char *bytes, int len, int loc,
                                int set);
 int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,
-                               unsigned char *bytes, int len, int loc,
+                               const unsigned char *bytes, int len, int loc,
                                int set);
 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
                                                const char *field, int type,
                                                const unsigned char *bytes,
                                                int len);
 X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,
-                                               int type, unsigned char *bytes,
+                                               int type, 
+                                               const unsigned char *bytes,
                                                int len);
 int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,
                                const unsigned char *bytes, int len, int loc,