diff options
author | Theo Buehler <tb@openbsd.org> | 2024-05-16 22:12:58 +0200 |
---|---|---|
committer | rodarima <rodarima@gmail.com> | 2024-05-18 20:54:21 +0200 |
commit | ea2263231abc770d5d87fcdb95fddd80679c5906 (patch) | |
tree | f4abe819148c47b4bc5538cd1b2545bbae9abf8d /src/IO | |
parent | b0f558ce519107a37f0b7cfd5a5a4f6b3d4ae64b (diff) |
Avoid reaching into X509_ALGOR
It would be nice if X509_ALGOR could be made opaque at some point.
There is a somewhat clumsy accessor X509_ALGOR_get0() that allows
obtaining the ASN1_OBJECT sitting inside an X509_ALGOR. Use this
instead.
Diffstat (limited to 'src/IO')
-rw-r--r-- | src/IO/tls_openssl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/IO/tls_openssl.c b/src/IO/tls_openssl.c index ceb06f93..90be78b7 100644 --- a/src/IO/tls_openssl.c +++ b/src/IO/tls_openssl.c @@ -464,8 +464,9 @@ static bool_t Tls_check_cert_strength(SSL *ssl, Server_t *srv, int *choice) * then trim off the "With..." part. */ b = BIO_new(BIO_s_mem()); - const X509_ALGOR *sigalg = X509_get0_tbs_sigalg(cert); - rc = i2a_ASN1_OBJECT(b, sigalg->algorithm); + const ASN1_OBJECT *algorithm; + X509_ALGOR_get0(&algorithm, NULL, NULL, X509_get0_tbs_sigalg(cert)); + rc = i2a_ASN1_OBJECT(b, algorithm); if (rc > 0) { rc = BIO_gets(b, buf, buflen); |