PROV: make some DER AID arrays non-static, to avoid clang complaints
authorRichard Levitte <levitte@openssl.org>
Tue, 12 May 2020 08:27:46 +0000 (10:27 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 14 May 2020 10:20:24 +0000 (12:20 +0200)
commit90ad284f4e76254f8d67686ae3a5d6c576037091
treee0808b32eb71e977d5e2bfe56ad80d8fa6ded88e
parent16e3588d98b313701a55ab1337b1d30ba7b08872
PROV: make some DER AID arrays non-static, to avoid clang complaints

The problem encountered is that some arrays were deemed unnecessary by
clang, for example:

    providers/common/der/der_rsa.c:424:28: error: variable 'der_aid_sha224Identifier' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
    static const unsigned char der_aid_sha224Identifier[] = {
                               ^

However, these arrays are used in sizeof() expressions in other parts
of the code that's actually used, making that warning-turned-error a
practical problem.  We solve this by making the array non-static,
which guarantees that the arrays will be emitted, even though
unnecessarily.  Fortunately, they are very small.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11710)
providers/common/der/der_rsa.c.in