Branch Coverage

amqp_openssl_hostname_validation.c
Criterion Covered Total %
branch 9 26 34.6


line true false branch
64 0 0 if (common_name_loc < 0) {
71 0 0 if (common_name_entry == NULL) {
77 0 0 if (common_name_asn1 == NULL) {
88 0 0 if ((size_t)ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
93 0 0 if (amqp_hostcheck(common_name_str, hostname) == AMQP_HCR_MATCH) {
121 0 1 if (san_names == NULL) {
127 2 0 for (i = 0; i < san_names_nb; i++) {
130 2 0 if (current_name->type == GEN_DNS) {
140 0 2 if ((size_t)ASN1_STRING_length(current_name->d.dNSName) !=
145 1 1 if (amqp_hostcheck(dns_name, hostname) == AMQP_HCR_MATCH) {
173 1 0 if ((hostname == NULL) || (server_cert == NULL)) return AMQP_HVR_ERROR;
0 1 if ((hostname == NULL) || (server_cert == NULL)) return AMQP_HVR_ERROR;
177 0 1 if (result == AMQP_HVR_NO_SAN_PRESENT) {