Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare stack in headers, not define them, when building openssl #10669

Closed
wants to merge 1 commit into from
Closed

Declare stack in headers, not define them, when building openssl #10669

wants to merge 1 commit into from

Conversation

richsalz
Copy link
Contributor

This uses #10666 so that when building OpenSSL, no STACK_OF "static inline functions" are defined. This has a couple of benefits:

  • We know exactly which STACK's are used in which functions
  • We don't have "static inline" and the associated work-arounds/hacks in our header files
  • It's a code cleanup thing, make it easier to change in a future release.
  • Should make linking a teensy bit quicker since it doesn't have to remove duplicate static inline functions across compilation units.

I did not change the STRING stacks, since they're too pervasive.

@richsalz richsalz changed the title Declare stack Declare stack in headers, not define them, when building openssl Dec 20, 2019
@richsalz
Copy link
Contributor Author

Also relevant to the discussion in #10538 and perhaps another way to do things like #10558.

include/openssl/asn1t.h Outdated Show resolved Hide resolved
@levitte
Copy link
Member

levitte commented Dec 21, 2019

I did not change the STRING stacks, since they're too pervasive.

Unfortunately, they are also the main issue that we are battling. As long as they aren't moved in a similar way, the issue I demonstrated in #10666.

An idea is to move those DEFINE calls to include/internal/safestack.h and include "internal/safestack.h" in our .c files, where necessary.

@richsalz richsalz changed the title Declare stack in headers, not define them, when building openssl WIP: Declare stack in headers, not define them, when building openssl Dec 21, 2019
@richsalz
Copy link
Contributor Author

I fixed STACK_OF OPENSSL_STRING and OPENSSL_CSTRING. I think the latter should be removed, but that's a side note. I made this a WIP until I get around to fixing the build issues. I think it's in ParseC.

@levitte
Copy link
Member

levitte commented Dec 21, 2019

I [ahem] went in that fixed the ParseC problem. Small rearrangement of safestack.h included.

@richsalz
Copy link
Contributor Author

I had safestack changed around on purpose :) Not worth arguing about.
I'll have to rebase in bit to fix the conflicts.

@levitte
Copy link
Member

levitte commented Dec 21, 2019

I had safestack changed around on purpose :)

well, defining some DEFINE_STACK_OF macros only sometimes seemed wrong to me

@richsalz
Copy link
Contributor Author

I only wanted to define what was actually used (to make it easier to remove this stuff in a future release). But like I said, it's not a big deal :)

@richsalz
Copy link
Contributor Author

Rebased to resolve conflict and pushed.

@richsalz richsalz changed the title WIP: Declare stack in headers, not define them, when building openssl Declare stack in headers, not define them, when building openssl Dec 29, 2019
@richsalz
Copy link
Contributor Author

CI's passing, out of WIP, ready for review.

As a reminder, this keeps backward compatibility with defining "static inline" functions in safestack.h, but also does the right thing if no-deprecated is configured so only the source files that need them define the functions. It does this by using the macro defined in #10666, so that should be approved as part of this approval.

@petrovr
Copy link

petrovr commented Dec 29, 2019

Proposed solution does not look correct ( build with --api=3.0.0 ).

Quote from relevant configure check:

configure:13060: checking how to link programs using OpenSSL functions
configure:13084: gcc -o conftest  -g -O3 -std=c99 -Wall -Wextra -Wpedantic -Wmultichar -Wundef -Wshadow -Wbad-function-cast -Wcast-align -Wno-sign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wno-long-long -pipe -Wall -Wextra -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-strong  -DENABLE_KEX_SNTRUP4591761X25519 -I[builddir]/include -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE  -L[builddir] -Wl,-rpath,[builddir] -Wl,-rpath,/opt/openldap/2.4.48-sslmaster/usr/lib64 -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong conftest.c -lcrypto  -lutil -lz  >&5
In file included from [builddir]/include/openssl/types.h:20:0,
                 from [builddir]/include/openssl/evp.h:22,
                 from conftest.c:244:
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:30:45: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
                                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:30:66: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
                                                                  ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:31:40: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef void (*sk_##t1##_freefunc)(t3 *a); \
                                        ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:32:13: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:32:46: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
                                              ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:37:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_STRING_TABLE_value':
[builddir]/include/openssl/asn1.h:124:28: error: 'ASN1_STRING_TABLE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:39:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: note: each undeclared identifier is reported only once for each function it appears in
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:39:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:39:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:37:76: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                                                            ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:37:84: warning: unused parameter 'idx' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                                                                    ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:65:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_STRING_TABLE_delete':
[builddir]/include/openssl/asn1.h:124:28: error: 'ASN1_STRING_TABLE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:67:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:67:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:65:71: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                                                       ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:65:79: warning: unused parameter 'i' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                                                               ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:69:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:69:79: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
                                                                               ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:74:73: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
                                                                         ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:78:76: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
                                                                            ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:82:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_STRING_TABLE_pop':
[builddir]/include/openssl/asn1.h:124:28: error: 'ASN1_STRING_TABLE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:84:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:84:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:82:68: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
                                                                    ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:86:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_STRING_TABLE_shift':
[builddir]/include/openssl/asn1.h:124:28: error: 'ASN1_STRING_TABLE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:88:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:88:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:86:70: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
                                                                      ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/safestack.h:90:78: error: unknown type name 'sk_ASN1_STRING_TABLE_freefunc'
     static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
                                                                              ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:94:75: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
                                                                           ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:98:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:98:81: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
                                                                                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:102:73: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
                                                                         ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:124:28: error: unknown type name 'ASN1_STRING_TABLE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
                            ^
[builddir]/include/openssl/safestack.h:106:76: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
                                                                            ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/safestack.h:124:53: error: unknown type name 'sk_ASN1_STRING_TABLE_freefunc'
                                                     sk_##t1##_freefunc freefunc) \
                                                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:124:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_STRING_TABLE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:30:45: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
                                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:30:66: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
                                                                  ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:31:40: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef void (*sk_##t1##_freefunc)(t3 *a); \
                                        ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:32:13: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:32:46: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
                                              ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:37:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_TYPE_value':
[builddir]/include/openssl/asn1.h:128:28: error: 'ASN1_TYPE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:39:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:39:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:37:76: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                                                            ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:37:84: warning: unused parameter 'idx' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
                                                                                    ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:65:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_TYPE_delete':
[builddir]/include/openssl/asn1.h:128:28: error: 'ASN1_TYPE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:67:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:67:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:65:71: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                                                       ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:65:79: warning: unused parameter 'i' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
                                                                               ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:69:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:69:79: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
                                                                               ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:74:73: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
                                                                         ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:78:76: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
                                                                            ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:82:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_TYPE_pop':
[builddir]/include/openssl/asn1.h:128:28: error: 'ASN1_TYPE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:84:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:84:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:82:68: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
                                                                    ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:86:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: In function 'sk_ASN1_TYPE_shift':
[builddir]/include/openssl/asn1.h:128:28: error: 'ASN1_TYPE' undeclared (first use in this function)
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:88:17: note: in definition of macro 'SKM_DEFINE_STACK_OF'
         return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:88:21: error: expected expression before ')' token
         return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:86:70: warning: unused parameter 'sk' [-Wunused-parameter]
     static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
                                                                      ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h: At top level:
[builddir]/include/openssl/safestack.h:90:78: error: unknown type name 'sk_ASN1_TYPE_freefunc'
     static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
                                                                              ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:94:75: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
                                                                           ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:98:36: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
                                    ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:98:81: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
                                                                                 ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:102:73: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
                                                                         ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/asn1.h:128:28: error: unknown type name 'ASN1_TYPE'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
                            ^
[builddir]/include/openssl/safestack.h:106:76: note: in definition of macro 'SKM_DEFINE_STACK_OF'
     static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
                                                                            ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
[builddir]/include/openssl/safestack.h:124:53: error: unknown type name 'sk_ASN1_TYPE_freefunc'
                                                     sk_##t1##_freefunc freefunc) \
                                                     ^
[builddir]/include/openssl/safestack.h:135:29: note: in expansion of macro 'SKM_DEFINE_STACK_OF'
 # define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
                             ^
[builddir]/include/openssl/safestack.h:175:40: note: in expansion of macro 'DEFINE_STACK_OF'
 # define DEFINE_OR_DECLARE_STACK_OF(s) DEFINE_STACK_OF(s)
                                        ^
[builddir]/include/openssl/asn1.h:128:1: note: in expansion of macro 'DEFINE_OR_DECLARE_STACK_OF'
 DEFINE_OR_DECLARE_STACK_OF(ASN1_TYPE)
 ^
conftest.c:247:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 main ()
 ^
configure:13084: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "PKIX-SSH"
| #define PACKAGE_TARNAME "openssh"
| #define PACKAGE_VERSION "12.3"
| #define PACKAGE_STRING "PKIX-SSH 12.3"
| #define PACKAGE_BUGREPORT "ssh_x509@roumenpetrov.info"
| #define PACKAGE_URL "https://roumenpetrov.info/secsh"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define _PATH_PASSWD_PROG "/usr/bin/passwd"
| #define HAVE_RLIMIT_NPROC 1
| #define WITH_OPENSSL 1
| #define HAVE_ATTRIBUTE__SENTINEL__ 1
| #define HAVE_ATTRIBUTE__NONNULL__ 1
| #define HAVE_CRYPT_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_ENDIAN_H 1
| #define HAVE_ELF_H 1
| #define HAVE_ERR_H 1
| #define HAVE_FEATURES_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_FNMATCH_H 1
| #define HAVE_GETOPT_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_IFADDRS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_PATHS_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PTY_H 1
| #define HAVE_RPC_TYPES_H 1
| #define HAVE_SHADOW_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_BITYPES_H 1
| #define HAVE_SYS_CDEFS_H 1
| #define HAVE_SYS_DIR_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_SYS_PTRACE_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_STROPTS_H 1
| #define HAVE_SYS_STATFS_H 1
| #define HAVE_SYS_STATVFS_H 1
| #define HAVE_SYS_SYSMACROS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_VFS_H 1
| #define HAVE_TIME_H 1
| #define HAVE_TTYENT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_UTMPX_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_NET_ROUTE_H 1
| #define HAVE_SYS_SYSCTL_H 1
| #define HAVE_LASTLOG_H 1
| #define HAVE_SYS_MOUNT_H 1
| #define HAVE_SYS_UN_H 1
| #define PAM_TTY_KLUDGE 1
| #define LOCKED_PASSWD_PREFIX "!"
| #define SPT_TYPE SPT_REUSEARGV
| #define LINK_OPNOTSUPP_ERRNO EPERM
| #define _PATH_BTMP "/var/log/btmp"
| #define USE_BTMP 1
| #define LINUX_OOM_ADJUST 1
| #define HAVE_LINUX_IF_TUN_H 1
| #define SSH_TUN_LINUX 1
| #define SSH_TUN_COMPAT_AF 1
| #define SSH_TUN_PREPEND_AF 1
| #define SYS_RDOMAIN_LINUX 1
| #define HAVE_LINUX_SECCOMP_H 1
| #define HAVE_LINUX_FILTER_H 1
| #define HAVE_LINUX_AUDIT_H 1
| #define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64
| #define HAVE_DIRNAME 1
| #define HAVE_LIBGEN_H 1
| #define HAVE_BASENAME 1
| #define HAVE_LIBZ 1
| #define HAVE_UTIMES 1
| #define HAVE_LOGIN 1
| #define HAVE_LOGOUT 1
| #define HAVE_OPENPTY 1
| #define HAVE_UPDWTMP 1
| #define HAVE_LOGWTMP 1
| #define OPENPTY_CONST_ARG const
| #define HAVE_STRFTIME 1
| #define HAVE_STDLIB_H 1
| #define HAVE_MALLOC 1
| #define HAVE_STDLIB_H 1
| #define HAVE_REALLOC 1
| #define HAVE_CALLOC 1
| #define GLOB_HAS_ALTDIRFUNC 1
| #define HAVE_DECL_GLOB_NOMATCH 1
| #define BROKEN_STRNVIS 1
| #define HAVE_PROC_PID 1
| #define LIBWRAP 1
| #define SSH_AUDIT_EVENTS 1
| #define HAVE_ASPRINTF 1
| #define HAVE_BCOPY 1
| #define HAVE_BZERO 1
| #define HAVE_CLOCK 1
| #define HAVE_DIRFD 1
| #define HAVE_ENDGRENT 1
| #define HAVE_ERR 1
| #define HAVE_ERRX 1
| #define HAVE_FCHMOD 1
| #define HAVE_FCHMODAT 1
| #define HAVE_FCHOWN 1
| #define HAVE_FCHOWNAT 1
| #define HAVE_FLOCK 1
| #define HAVE_FNMATCH 1
| #define HAVE_FREEADDRINFO 1
| #define HAVE_FSTATFS 1
| #define HAVE_FSTATVFS 1
| #define HAVE_FUTIMES 1
| #define HAVE_GETADDRINFO 1
| #define HAVE_GETCWD 1
| #define HAVE_GETGROUPLIST 1
| #define HAVE_GETIFADDRS 1
| #define HAVE_GETLINE 1
| #define HAVE_GETNAMEINFO 1
| #define HAVE_GETOPT 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_GETPGID 1
| #define HAVE_GETRLIMIT 1
| #define HAVE_GETSID 1
| #define HAVE_GETTTYENT 1
| #define HAVE_GLOB 1
| #define HAVE_INET_ATON 1
| #define HAVE_INET_NTOA 1
| #define HAVE_INET_NTOP 1
| #define HAVE_INNETGR 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_MEMMEM 1
| #define HAVE_MEMMOVE 1
| #define HAVE_MKDTEMP 1
| #define HAVE_POLL 1
| #define HAVE_PRCTL 1
| #define HAVE_RAISE 1
| #define HAVE_RECVMSG 1
| #define HAVE_RRESVPORT_AF 1
| #define HAVE_SENDMSG 1
| #define HAVE_SETEGID 1
| #define HAVE_SETENV 1
| #define HAVE_SETEUID 1
| #define HAVE_SETGROUPS 1
| #define HAVE_SETLINEBUF 1
| #define HAVE_SETREGID 1
| #define HAVE_SETREUID 1
| #define HAVE_SETRLIMIT 1
| #define HAVE_SETSID 1
| #define HAVE_SETVBUF 1
| #define HAVE_SIGACTION 1
| #define HAVE_SNPRINTF 1
| #define HAVE_SOCKETPAIR 1
| #define HAVE_STATFS 1
| #define HAVE_STATVFS 1
| #define HAVE_STRCASESTR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRNDUP 1
| #define HAVE_STRNLEN 1
| #define HAVE_STRPTIME 1
| #define HAVE_STRSIGNAL 1
| #define HAVE_STRTOLL 1
| #define HAVE_STRTOUL 1
| #define HAVE_STRTOULL 1
| #define HAVE_SYSCONF 1
| #define HAVE_TCGETPGRP 1
| #define HAVE_TRUNCATE 1
| #define HAVE_UNSETENV 1
| #define HAVE_UPDWTMPX 1
| #define HAVE_UTIMENSAT 1
| #define HAVE_USLEEP 1
| #define HAVE_VASPRINTF 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_WAITPID 1
| #define HAVE_WARN 1
| #define HAVE_DECL_BZERO 1
| #define HAVE_DECL_MEMMEM 1
| #define HAVE_DECL_ENDGRENT 1
| #define HAVE_DECL_ENDPWENT 1
| #define HAVE_MBLEN 1
| #define HAVE_MBTOWC 1
| #define HAVE_NL_LANGINFO 1
| #define HAVE_WCWIDTH 1
| #define HAVE_ISBLANK 1
| #define HAVE_GAI_STRERROR 1
| #define HAVE_GAI_STRERROR 1
| #define HAVE_CONST_GAI_STRERROR_PROTO 1
| #define HAVE_NANOSLEEP 1
| #define HAVE_CLOCK_GETTIME 1
| #define HAVE_STRSEP 1
| #define HAVE_TCSENDBREAK 1
| #define HAVE_DECL_H_ERRNO 1
| #define HAVE_DECL_SHUT_RD 1
| #define HAVE_DECL_O_NONBLOCK 1
| #define HAVE_DECL_READV 1
| #define HAVE_DECL_WRITEV 1
| #define HAVE_DECL_MAXSYMLINKS 1
| #define HAVE_DECL_OFFSETOF 1
| #define HAVE_DECL_HOWMANY 1
| #define HAVE_DECL_NFDBITS 1
| #define HAVE_FD_MASK 1
| #define HAVE_SETRESUID 1
| #define HAVE_SETRESGID 1
| #define HAVE_REALPATH 1
| #define BROKEN_REALPATH 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_TIME 1
| #define HAVE_ENDUTXENT 1
| #define HAVE_GETUTXENT 1
| #define HAVE_GETUTXID 1
| #define HAVE_GETUTXLINE 1
| #define HAVE_PUTUTXLINE 1
| #define HAVE_SETUTXENT 1
| #define HAVE_UTMPXNAME 1
| #define HAVE_DAEMON 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_SO_PEERCRED 1
| #define HAVE_STRICT_MKSTEMP 1
| #define HAVE_DECL_AI_NUMERICSERV 1
| #define HAVE_GETPGRP 1
| #define GETPGRP_VOID 1
| /* end confdefs.h.  */
| 
| #include <openssl/evp.h>
| 
| int
| main ()
| {
| 
| /* "OpenSSL_add_all_algorithms" is macro existing in 1.1.0
|  * only for backward compatibility, i.e. some builds could
|  * deprecate it.
|   OpenSSL_add_all_algorithms(); */
|   EVP_add_cipher(NULL);
| 
|   ;
|   return 0;
| }

@richsalz
Copy link
Contributor Author

"relevant configure check" I don't know what that is, it's not part of openssl.

@richsalz
Copy link
Contributor Author

richsalz commented Jan 7, 2020

Rebased on master since it needs #10753

@levitte
Copy link
Member

levitte commented Jan 7, 2020

You need to fix engines/e_afalg.c

@richsalz
Copy link
Contributor Author

richsalz commented Jan 7, 2020

I think the better fix is to move some "typedef struct .... ASN_xxx"; to types.h, like all the other ASN1 struct typedefs. Additional commit pushed.

@petrovr
Copy link

petrovr commented Jan 7, 2020 via email

@richsalz
Copy link
Contributor Author

richsalz commented Jan 8, 2020

Can you post what the small sample program is? I see a command line and a configure argument, but no failing C code. Thanks.

@levitte
Copy link
Member

levitte commented Jan 8, 2020

@richsalz, the failing program in question is there, at the end of #10669 (comment), which is what @petrovr is trying to tell you. I'll quote it again here:

#include <openssl/evp.h>

int
main ()
{
  EVP_add_cipher(NULL);

  return 0;
}

@richsalz
Copy link
Contributor Author

richsalz commented Jan 8, 2020

I missed that, sorry. And thanks @petrovr. So config "--with-api=3.0" and try to compile that small program? Got it.

@levitte
Copy link
Member

levitte commented Jan 8, 2020

Also try config with --api=3.0.0 and no-deprecated

@richsalz
Copy link
Contributor Author

richsalz commented Jan 8, 2020

Works for me.

; ./config '--api=3.0.0' no-deprecated
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 3.0.0-dev for target linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Running configdata.pm
Creating Makefile

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
; make -s
; cat a.c
#include <openssl/evp.h>

int
main ()
{
  EVP_add_cipher(NULL);

  return 0;
}
; clang -Iinclude a.c libcrypto.so
; gcc -Iinclude a.c libcrypto.so  
; 

more suggestions?

@petrovr
Copy link

petrovr commented Jan 19, 2020 via email

@richsalz
Copy link
Contributor Author

Okay, so here is what I was thinking happens. This line

#ifdef sk_STRING_new_null

at https://github.com/msftguy/openssh-sc/blob/master/ssh-ocsp.c#L65 is the problem, exposed by the configuration flags. You have "--api=3.0.0 no-deprecated" which means that the earlier API's, in particular, that the STACK functions are declared always in the header file, does not happen.

From INSTALL:
'''
... For example
"--api=1.1.0" with "no-deprecated" will remove
support for all APIS that were deprecated in
OpenSSL version 1.1.0 or below.


Does this make sense?  You need to change something, perhaps the config. :)

@levitte
Copy link
Member

levitte commented Jan 20, 2020

Hmmm, sk_STRING_new_null isn't defined as a macro. It was, a long time ago (I think that was before 1.0.0), so whatever code that's guarded by that ifdef should be irrelevant today, i.e old cruft that would be cleaned away if it was me...

@petrovr
Copy link

petrovr commented Jan 20, 2020 via email

@richsalz
Copy link
Contributor Author

I still think you are (a) testing for old code and (b) configuring openssl to not include old code. @levitte do you agree with me?

@richsalz
Copy link
Contributor Author

richsalz commented Mar 2, 2020

updated commit pushed to fix "no-deprecated" build.

@richsalz
Copy link
Contributor Author

rebased to address conflicts and pushed.

@richsalz
Copy link
Contributor Author

Rebased to fix conflict in apps/pkcs12.c

@t8m
Copy link
Member

t8m commented Apr 15, 2020

Unfortunately there is one more conflict now.

@richsalz
Copy link
Contributor Author

Please see #11263 (comment)

... and only *define* them in the source files that need them.
Use DEFINE_OR_DECLARE which is set appropriately for internal builds
and not non-deprecated builds.

Deprecate stack-of-block

Better documentation

Move some ASN1 struct typedefs to types.h

Update ParseC to handle this.  Most of all, ParseC needed to be more
consistent.  The handlers are "recursive", in so far that they are called
again and again until they terminate, which depends entirely on what the
"massager" returns.  There's a comment at the beginning of ParseC that
explains how that works. {Richard Levtte}
@richsalz
Copy link
Contributor Author

rebased. added some missing cases. i forgot about my promise to not rebase again. just like the project forgets to look at PR's :)

Copy link
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great cleanup work. Thank you, Rich.

@t8m t8m added approval: done This pull request has the required number of approvals branch: master Merge to master branch labels Apr 23, 2020
@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.

openssl-machine pushed a commit that referenced this pull request Apr 24, 2020
... and only *define* them in the source files that need them.
Use DEFINE_OR_DECLARE which is set appropriately for internal builds
and not non-deprecated builds.

Deprecate stack-of-block

Better documentation

Move some ASN1 struct typedefs to types.h

Update ParseC to handle this.  Most of all, ParseC needed to be more
consistent.  The handlers are "recursive", in so far that they are called
again and again until they terminate, which depends entirely on what the
"massager" returns.  There's a comment at the beginning of ParseC that
explains how that works. {Richard Levtte}

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from #10669)
@t8m t8m added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Apr 24, 2020
@t8m
Copy link
Member

t8m commented Apr 24, 2020

Merged to master. Thank you, Rich, for your cleanup work.

@t8m t8m closed this Apr 24, 2020
@richsalz richsalz deleted the declare-stack branch April 24, 2020 14:46
@richsalz
Copy link
Contributor Author

Thanks for not giving up on this.

@mattcaswell
Copy link
Member

This seems to have broken stuff.

See failing build log here:

https://travis-ci.org/github/openssl/openssl/jobs/679519464

@mattcaswell
Copy link
Member

@levitte
Copy link
Member

levitte commented Apr 27, 2020

@mattcaswell, see #11655

@mattcaswell
Copy link
Member

@mattcaswell, see #11655

I suspect #11655 is not sufficient. The oss-fuzz build log above is complaining about issues in srp.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants