]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10375 libldap/tls2: const up oids
authorCaolán McNamara <caolanm@gmail.com>
Sat, 26 Jul 2025 20:00:50 +0000 (21:00 +0100)
committerHoward Chu <hyc@openldap.org>
Mon, 28 Jul 2025 14:19:04 +0000 (15:19 +0100)
to move it out of the .data section

libraries/libldap/tls2.c

index 1bda3fb2aad7737b0fd318e1f139e4b9253e2c81..1fb878aab8a8e011810e1203dccd74bb5aed5488 100644 (file)
@@ -51,7 +51,7 @@ typedef struct oid_name {
        struct berval name;
 } oid_name;
 
-static oid_name oids[] = {
+static const oid_name oids[] = {
        { BER_BVC("2.5.4.3"), BER_BVC("cn") },
        { BER_BVC("2.5.4.4"), BER_BVC("sn") },
        { BER_BVC("2.5.4.6"), BER_BVC("c") },
@@ -1394,7 +1394,7 @@ ldap_start_tls_s ( LDAP *ld,
 #define        LBER_TAG_UNIVERSAL      ((ber_tag_t) 0x1cUL)
 #define        LBER_TAG_BMP            ((ber_tag_t) 0x1eUL)
 
-static oid_name *
+static const oid_name *
 find_oid( struct berval *oid )
 {
        int i;
@@ -1519,7 +1519,7 @@ ldap_X509dn2bv( void *x509_name, struct berval *bv, LDAPDN_rewrite_func *func,
        int csize;
        ber_tag_t tag;
        ber_len_t len;
-       oid_name *oidname;
+       const oid_name *oidname;
 
        struct berval   Oid, Val, oid2, *in = x509_name;