Commit 739a1eb1 authored by Rich Salz's avatar Rich Salz
Browse files

Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxx



Rename sk_xxx to OPENSSL_sk_xxx and _STACK to OPENSSL_STACK
Rename lh_xxx API to OPENSSL_LH_xxx and LHASH_NODE to OPENSSL_LH_NODE
Make lhash stuff opaque.
Use typedefs for function pointers; makes the code simpler.
Remove CHECKED_xxx macros.
Add documentation; remove old X509-oriented doc.
Add API-compat names for entire old API

Reviewed-by: default avatarDr. Stephen Henson <steve@openssl.org>
parent 06593767
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4,6 +4,11 @@
 Changes between 1.0.2h and 1.1.0  [xx XXX 2016]
  *) The stack and lhash API's were renamed to start with OPENSSL_SK_
     and OPENSSL_LH_, respectively.  The old names are available
     with API compatibility.  They new names are now completely documented.
     [Rich Salz]
  *) Unify TYPE_up_ref(obj) methods signature.
     SSL_CTX_up_ref(), SSL_up_ref(), X509_up_ref(), EVP_PKEY_up_ref(),
     X509_CRL_up_ref(), X509_OBJECT_up_ref_count() methods are now returning an
+2 −2
Original line number Diff line number Diff line
@@ -1283,7 +1283,7 @@ static unsigned long index_serial_hash(const OPENSSL_CSTRING *a)
    n = a[DB_serial];
    while (*n == '0')
        n++;
    return (lh_strhash(n));
    return OPENSSL_LH_strhash(n);
}

static int index_serial_cmp(const OPENSSL_CSTRING *a,
@@ -1303,7 +1303,7 @@ static int index_name_qual(char **a)

static unsigned long index_name_hash(const OPENSSL_CSTRING *a)
{
    return (lh_strhash(a[DB_name]));
    return OPENSSL_LH_strhash(a[DB_name]);
}

int index_name_cmp(const OPENSSL_CSTRING *a, const OPENSSL_CSTRING *b)
+1 −1
Original line number Diff line number Diff line
@@ -525,7 +525,7 @@ static int function_cmp(const FUNCTION * a, const FUNCTION * b)

static unsigned long function_hash(const FUNCTION * a)
{
    return lh_strhash(a->name);
    return OPENSSL_LH_strhash(a->name);
}

static int SortFnByName(const void *_f1, const void *_f2)
+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
        } else if (ret == -1)
            return -1;
        if (!*val)
            *val = (ASN1_VALUE *)sk_new_null();
            *val = (ASN1_VALUE *)OPENSSL_sk_new_null();
        else {
            /*
             * We've got a valid STACK: free up any items present
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ char *_CONF_get_string(const CONF *conf, const char *section,

static unsigned long conf_value_hash(const CONF_VALUE *v)
{
    return (lh_strhash(v->section) << 2) ^ lh_strhash(v->name);
    return (OPENSSL_LH_strhash(v->section) << 2) ^ OPENSSL_LH_strhash(v->name);
}

static int conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b)
Loading