rabbitmq-c
rabbitmq-c copied to clipboard
amqp_ssl_validate_hostname is implemented (with more features and flags) in latest openssl versions
https://wiki.openssl.org/index.php/Hostname_validation
Instead of amqp_ssl_socket_set_verify_hostname
, it's better to have a function like this:
AMQP_PUBLIC_FUNCTION
void AMQP_CALL amqp_ssl_socket_set_xxx(amqp_socket_t *self, const void *hostname, size_t n);
and do something like that:
X509_VERIFY_PARAM * param = SSL_CTX_get0_param(((amqp_ssl_socket_t *)self)->ctx);
X509_VERIFY_PARAM_set1_host(param, hostname, n);