Use strcmp for strings

This commit is contained in:
Praveen Kumar D 2023-05-15 15:31:40 +05:30
parent b9cef1f137
commit 7f8730b186
1 changed files with 2 additions and 2 deletions

View File

@ -3079,7 +3079,7 @@ static int dtls_state_setup(switch_rtp_t *rtp_session, switch_dtls_t *dtls)
fp.type = dtls->remote_fp->type; fp.type = dtls->remote_fp->type;
switch_core_cert_extract_fingerprint(cert, &fp); switch_core_cert_extract_fingerprint(cert, &fp);
r = !memcmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); r = !strncmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN);
X509_free(cert); X509_free(cert);
} }
@ -3279,7 +3279,7 @@ static int cb_verify_peer(int preverify_ok, X509_STORE_CTX *ctx)
fp.type = dtls->remote_fp->type; fp.type = dtls->remote_fp->type;
switch_core_cert_extract_fingerprint(cert, &fp); switch_core_cert_extract_fingerprint(cert, &fp);
r = !memcmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN); r = !strncmp(fp.str, dtls->remote_fp->str, MAX_FPSTRLEN);
X509_free(cert); X509_free(cert);
} else { } else {