3.0.0. IMPLEMENT_ASN1_FUNCTIONS missing _it prototypes

Richard Levitte levitte at openssl.org
Tue Aug 24 11:32:52 UTC 2021


Not sure why it's 3.0.0 only...  however, this looks like the usual
"you define, so you must declare it first".  There are a number of
declaration macros for our ASN.1 templates, in this case, I believe
that this is what you're looking for:

    DECLARE_ASN1_ITEM(TPM_PARTIAL_CERT_VALIDITY)

Cheers,
Richard

On Mon, 23 Aug 2021 21:42:00 +0200,
Ken Goldman wrote:
> 
> I get warnings on all my ASN1_SEQUENCE_END, a missing prototype for the _it functions.
> The code is working, but I'd like a clean compile.
> 
> 3.0.0 only, 1.0.2 and 1.1.1 are OK.
> 
> Example:
> 
> #include <openssl/asn1.h>
> #include <openssl/asn1t.h>
> #include <openssl/x509.h>
> #include <openssl/x509v3.h>
> 
> typedef struct {
>     ASN1_TIME *notBefore;
>     ASN1_TIME *notAfter;
> } TPM_PARTIAL_CERT_VALIDITY;
> 
> ASN1_SEQUENCE(TPM_PARTIAL_CERT_VALIDITY) = {
>     ASN1_SIMPLE(TPM_PARTIAL_CERT_VALIDITY, notBefore, ASN1_TIME),
>     ASN1_SIMPLE(TPM_PARTIAL_CERT_VALIDITY, notAfter, ASN1_TIME),
> } ASN1_SEQUENCE_END(TPM_PARTIAL_CERT_VALIDITY)	<<<< line 97 is here
> 
> certifyx509.c:97: warning: no previous prototype for 'TPM_PARTIAL_CERT_VALIDITY_it'
> 
> 
-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-users mailing list