An issue with EVP_PKEY_CTX_get0_pkey()?
Blumenthal, Uri - 0553 - MITLL
uri at ll.mit.edu
Tue Jan 3 15:52:42 UTC 2023
Richard, thank you - indeed, removing the offending re-definitions from the local "openssl-missing.h" file resolved the problem.
Happy New Year!
--
V/R,
Uri
On 1/3/23, 02:33, "Richard Levitte" <levitte at openssl.org> wrote:
openssl_missing.h seems to be the offending file, as it appears to
redefine functions / macros that are already present in the OpenSSL
version you use.
I can only assume that openssl_missing.h defines things that are
missing in older OpenSSL versions, i.e. is some sort of forward (or is
that backward... I'm always confused by the meaning of the direction)
compatibility layer. If that is the case, it might need a bit of
editing and use OpenSSL's version macros to determine what macros /
functions actually need to be defined in openssl_missing.h.
The version macros are documented in doc/man3/OpenSSL_version.pod
since OpenSSL 3.0.
Cheers,
Richard
On Mon, 02 Jan 2023 22:14:07 +0100,
Blumenthal, Uri - 0553 - MITLL wrote:
>
> The problem manifests itself when I attempt to compile Ruby gem "openssl-3.1.0" (I doubt it relates to OpenSSL release 3.1.0, but I'm not sure).
>
> It seems to be related to the fact that 'struct evp_md_ctx_st' is not available?
>
> Here's the offending lines (I don't see any problem with them):
>
> EVP_MD_CTX *ctx;
> EVP_PKEY *pkey;
>
> GetHMAC(self, ctx);
> pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx));
>
> Here's the error message:
>
> compiling ossl_hmac.c
> In file included from ossl_hmac.c:10:
> In file included from ./ossl.h:178:
> ./openssl_missing.h:195:11: warning: 'TS_VERIFY_CTS_set_certs' macro redefined [-Wmacro-redefined]
> # define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
> ^
> /opt/local/libexec/openssl3/include/openssl/ts.h:424:11: note: previous definition is here
> # define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)
> ^
> ossl_hmac.c:249:35: error: incomplete definition of type 'struct evp_md_ctx_st'
> pkey = EVP_PKEY_CTX_get0_pkey(EVP_MD_CTX_get_pkey_ctx(ctx));
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./openssl_missing.h:230:41: note: expanded from macro 'EVP_MD_CTX_get_pkey_ctx'
> # define EVP_MD_CTX_get_pkey_ctx(x) (x)->pctx
> ~~~^
> /opt/local/libexec/openssl3/include/openssl/types.h:104:16: note: forward declaration of 'struct evp_md_ctx_st'
> typedef struct evp_md_ctx_st EVP_MD_CTX;
> ^
> 1 warning and 1 error generated.
> make: *** [ossl_hmac.o] Error 1
>
>
> I'd appreciate any help or advice. Is it an OpenSSL problem? An openssl-3.1.0-rubygem problem? Do I need to report it on some Rubygems list?
>
> Thanks!
> --
> V/R,
> Uri Blumenthal Voice: (781) 981-1638
> Secure Resilient Systems and Technologies Cell: (339) 223-5363
> MIT Lincoln Laboratory
> 244 Wood Street, Lexington, MA 02420-9108
>
> Web: https://www.ll.mit.edu/biographies/uri-blumenthal
> Root CA: https://www.ll.mit.edu/llrca2.pem
>
> There are two ways to design a system. One is to make it so simple there are obviously no deficiencies.
> The other is to make it so complex there are no obvious deficiencies.
> - C. A. R. Hoare
>
> [2 smime.p7s <application/pkcs7-signature (base64)>]
> Good signature from 296A68FF75A6A4C4827D38BA5B63BF8BAC8E0C35 /CN=Blumenthal.Uri.50010584/OU=People/O=MIT Lincoln Laboratory/C=US (trust full)
--
Richard Levitte levitte at openssl.org
OpenSSL Project http://www.openssl.org/~levitte/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5249 bytes
Desc: not available
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20230103/8d16500a/attachment-0001.p7s>
More information about the openssl-users
mailing list