Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-04 Thread Matt Caswell
Going back to the original email in this thread: On 02/11/2021 19:42, Jason Schultz wrote:     mycert = PEM_read_X509(fp, NULL, 0, NULL);     pkey = X509_get_pubkey(mycert); All functions return good statuses or non-NULL pointers until the last one, X509_get_pubkey() returns NULL. The

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-04 Thread Tomas Mraz
On Wed, 2021-11-03 at 20:32 +, Jason Schultz wrote: > 00B741558E7F:error:0308010C:digital envelope routines:(unknown > function):unsupported:crypto/evp/evp_fetch.c:346:Global default > library > context, Algorithm (SHA1 : 96), Properties () The "Global default library context" hints at

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-03 Thread Jason Schultz
From: openssl-users on behalf of Viktor Dukhovni Sent: Wednesday, November 3, 2021 9:25 PM To: openssl-users@openssl.org Subject: Re: X509_get_pubkey() in OpenSSL 3.0? On Wed, Nov 03, 2021 at 08:32:43PM +, Jason Schultz wrote: > To summar

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-03 Thread Viktor Dukhovni
On Wed, Nov 03, 2021 at 08:32:43PM +, Jason Schultz wrote: > To summarize, at application start time I read in all of the > certificates in /etc/ssl/certs/ to a trusted store created with > X509_STORE_new(). > > When getting ready to "start" a server (again, leaving a lot of > specifics out

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-03 Thread Jason Schultz
ng? Jason From: openssl-users on behalf of Viktor Dukhovni Sent: Wednesday, November 3, 2021 4:47 PM To: openssl-users@openssl.org Subject: Re: X509_get_pubkey() in OpenSSL 3.0? On Wed, Nov 03, 2021 at 12:38:51PM +, Jason Schultz wrote: > In any case, things appear to b

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-03 Thread Viktor Dukhovni
On Wed, Nov 03, 2021 at 12:38:51PM +, Jason Schultz wrote: > In any case, things appear to be working now, but I'm hitting an issue > later on when calling SSL_CTX_build_cert_chain(). I working on > debugging that, I may have to start yet another thread later. Your mistake is probably in

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-03 Thread Jason Schultz
, 2021 9:01 PM To: openssl-users@openssl.org Subject: Re: X509_get_pubkey() in OpenSSL 3.0? On Tue, Nov 02, 2021 at 08:28:01PM +, Jason Schultz wrote: > Victor- > > I can't seem to find any documentation on SSL_CTX_get0_privatekey(), > but by the name of it, it sounds like

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Selva Nair
> X509 cert = SSL_CTX_get0_certificate(ctx); > EVP_PKEY pkey = X509_get_pubkey(cert); > *cert and *pkey ...

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Viktor Dukhovni
On Tue, Nov 02, 2021 at 08:28:01PM +, Jason Schultz wrote: > Victor- > > I can't seem to find any documentation on SSL_CTX_get0_privatekey(), > but by the name of it, it sounds like it's getting the private key; > I'm trying to get the public key. It does appear to be "under-documented"

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Selva Nair
On Tue, Nov 2, 2021 at 3:42 PM Jason Schultz wrote: > I thought I should start a new thread since this question was buried in my > "FIPS" thread and I dont' think it has anything to do with FIPS and OpenSSL > providers. I'm hitting another problem that I think is related to the > migration to

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Jason Schultz
Victor- I can't seem to find any documentation on SSL_CTX_get0_privatekey(), but by the name of it, it sounds like it's getting the private key; I'm trying to get the public key. That said, I should probably explain more of why I'm doing what I'm doing, because there may be an easier way all

自动回复: Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread 562430030 via openssl-users
您好,您的邮件我已收到,我会尽快阅读,谢谢!

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Viktor Dukhovni
On Tue, Nov 02, 2021 at 07:42:15PM +, Jason Schultz wrote: > I thought I should start a new thread since this question was buried in my > "FIPS" thread and I dont' think it has anything to do with FIPS and OpenSSL > providers. I'm hitting another problem that I think is related to the >

Re: X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Jason Schultz
Subject: X509_get_pubkey() in OpenSSL 3.0? I thought I should start a new thread since this question was buried in my "FIPS" thread and I dont' think it has anything to do with FIPS and OpenSSL providers. I'm hitting another problem that I think is related to the migration to O

X509_get_pubkey() in OpenSSL 3.0?

2021-11-02 Thread Jason Schultz
I thought I should start a new thread since this question was buried in my "FIPS" thread and I dont' think it has anything to do with FIPS and OpenSSL providers. I'm hitting another problem that I think is related to the migration to OpenSSL 3.0, as this code works with OpenSSL 1.1.1 (and 1.0.2