x509_conf: rename ext_struc into ext_struct
authortb <tb@openbsd.org>
Tue, 18 Jun 2024 05:56:37 +0000 (05:56 +0000)
committertb <tb@openbsd.org>
Tue, 18 Jun 2024 05:56:37 +0000 (05:56 +0000)
requested by jsing on review

lib/libcrypto/x509/x509_conf.c

index 50f5bb2..9f6b392 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_conf.c,v 1.13 2024/06/18 05:39:52 tb Exp $ */
+/* $OpenBSD: x509_conf.c,v 1.14 2024/06/18 05:56:37 tb Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 1999.
  */
@@ -79,7 +79,7 @@ static char *conf_lhash_get_string(void *db, const char *section,
 static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db,
     const char *section);
 static X509_EXTENSION *do_ext_i2d(const X509V3_EXT_METHOD *method, int nid,
-    int crit, void *ext_struc);
+    int crit, void *ext_struct);
 static unsigned char *generic_asn1(const char *value, X509V3_CTX *ctx,
     long *ext_len);
 
@@ -131,7 +131,7 @@ do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int nid, int crit,
 {
        const X509V3_EXT_METHOD *method;
        X509_EXTENSION *ext;
-       void *ext_struc;
+       void *ext_struct;
 
        if (nid == NID_undef) {
                X509V3error(X509V3_R_UNKNOWN_EXTENSION_NAME);
@@ -157,36 +157,36 @@ do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int nid, int crit,
                                sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
                        return NULL;
                }
-               ext_struc = method->v2i(method, ctx, nval);
+               ext_struct = method->v2i(method, ctx, nval);
                if (*value != '@')
                        sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
        } else if (method->s2i) {
-               ext_struc = method->s2i(method, ctx, value);
+               ext_struct = method->s2i(method, ctx, value);
        } else if (method->r2i) {
                if (!ctx->db || !ctx->db_meth) {
                        X509V3error(X509V3_R_NO_CONFIG_DATABASE);
                        return NULL;
                }
-               ext_struc = method->r2i(method, ctx, value);
+               ext_struct = method->r2i(method, ctx, value);
        } else {
                X509V3error(X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED);
                ERR_asprintf_error_data("name=%s", OBJ_nid2sn(nid));
                return NULL;
        }
-       if (ext_struc == NULL)
+       if (ext_struct == NULL)
                return NULL;
 
-       ext = do_ext_i2d(method, nid, crit, ext_struc);
+       ext = do_ext_i2d(method, nid, crit, ext_struct);
        if (method->it)
-               ASN1_item_free(ext_struc, method->it);
+               ASN1_item_free(ext_struct, method->it);
        else
-               method->ext_free(ext_struc);
+               method->ext_free(ext_struct);
        return ext;
 }
 
 static X509_EXTENSION *
 do_ext_i2d(const X509V3_EXT_METHOD *method, int nid, int crit,
-    void *ext_struc)
+    void *ext_struct)
 {
        unsigned char *ext_der = NULL;
        int ext_len;
@@ -196,18 +196,18 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int nid, int crit,
        /* Convert internal representation to DER */
        if (method->it != NULL) {
                ext_der = NULL;
-               ext_len = ASN1_item_i2d(ext_struc, &ext_der, method->it);
+               ext_len = ASN1_item_i2d(ext_struct, &ext_der, method->it);
                if (ext_len < 0)
                        goto merr;
        } else {
                unsigned char *p;
 
-               if ((ext_len = method->i2d(ext_struc, NULL)) <= 0)
+               if ((ext_len = method->i2d(ext_struct, NULL)) <= 0)
                        goto merr;
                if ((ext_der = calloc(1, ext_len)) == NULL)
                        goto merr;
                p = ext_der;
-               if (method->i2d(ext_struc, &p) != ext_len)
+               if (method->i2d(ext_struct, &p) != ext_len)
                        goto merr;
        }
        if ((ext_oct = ASN1_OCTET_STRING_new()) == NULL)
@@ -234,7 +234,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int nid, int crit,
 /* Given an internal structure, nid and critical flag create an extension */
 
 X509_EXTENSION *
-X509V3_EXT_i2d(int nid, int crit, void *ext_struc)
+X509V3_EXT_i2d(int nid, int crit, void *ext_struct)
 {
        const X509V3_EXT_METHOD *method;
 
@@ -242,7 +242,7 @@ X509V3_EXT_i2d(int nid, int crit, void *ext_struc)
                X509V3error(X509V3_R_UNKNOWN_EXTENSION);
                return NULL;
        }
-       return do_ext_i2d(method, nid, crit, ext_struc);
+       return do_ext_i2d(method, nid, crit, ext_struct);
 }
 LCRYPTO_ALIAS(X509V3_EXT_i2d);