mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
we only need to call ASN1_STRING_length() if ASN1_STRING_type() detects UTF-8,
else ASN1_STRING_to_UTF8() returns the string length.
This commit is contained in:
parent
3669ff3c1e
commit
6daede08cb
@ -1176,8 +1176,8 @@ static CURLcode verifyhost(struct connectdata *conn,
|
|||||||
conditional in the future when OpenSSL has been fixed. Work-around
|
conditional in the future when OpenSSL has been fixed. Work-around
|
||||||
brought by Alexis S. L. Carvalho. */
|
brought by Alexis S. L. Carvalho. */
|
||||||
if(tmp) {
|
if(tmp) {
|
||||||
j = ASN1_STRING_length(tmp);
|
|
||||||
if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
|
if(ASN1_STRING_type(tmp) == V_ASN1_UTF8STRING) {
|
||||||
|
j = ASN1_STRING_length(tmp);
|
||||||
if(j >= 0) {
|
if(j >= 0) {
|
||||||
peer_CN = OPENSSL_malloc(j+1);
|
peer_CN = OPENSSL_malloc(j+1);
|
||||||
if(peer_CN) {
|
if(peer_CN) {
|
||||||
|
Loading…
Reference in New Issue
Block a user