diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-04-30 19:31:07 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-05 10:27:28 +0200 |
commit | 278260bfa238aefef5a1abe2043d2f812c3a4bd5 (patch) | |
tree | ec5b676ad3866755d0b2508b9e47cda8b26401b9 /include | |
parent | e307e616f25a6b7b0f343fc1e62a35b2cba888f3 (diff) |
Strengthen X509_STORE_CTX_print_verify_cb() to print expected host etc.
Add X509_VERIFY_PARAM_get0_host(), X509_VERIFY_PARAM_get0_email(),
and X509_VERIFY_PARAM_get1_ip_asc() to support this,
as well as the internal helper function ipaddr_to_asc(), which
is used also for simplifying other IP address output functions.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11693)
Diffstat (limited to 'include')
-rw-r--r-- | include/internal/cryptlib.h | 1 | ||||
-rw-r--r-- | include/openssl/x509_vfy.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h index 615cd21ae8..03f147888a 100644 --- a/include/internal/cryptlib.h +++ b/include/internal/cryptlib.h @@ -238,5 +238,6 @@ static ossl_inline void ossl_sleep(unsigned long millis) char *sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text, const char *sep, size_t max_len); +char *ipaddr_to_asc(unsigned char *p, int len); #endif diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h index 84b076a1cb..92aed08380 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -585,6 +585,7 @@ int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param, uint32_t flags); uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param); +char *X509_VERIFY_PARAM_get0_host(X509_VERIFY_PARAM *param, int idx); int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, const char *name, size_t namelen); int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param, @@ -594,8 +595,10 @@ void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param); char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param); void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *); +char *X509_VERIFY_PARAM_get0_email(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param, const char *email, size_t emaillen); +char *X509_VERIFY_PARAM_get1_ip_asc(X509_VERIFY_PARAM *param); int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param, const unsigned char *ip, size_t iplen); int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, |