mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
avoid crash
This commit is contained in:
parent
c6799a2125
commit
b621721cf3
@ -3338,13 +3338,17 @@ validate_server_name(X509 *cert) {
|
||||
|
||||
if (alt_name->type == GEN_DNS) {
|
||||
char *buffer = NULL;
|
||||
ASN1_STRING_to_UTF8((unsigned char**)&buffer,
|
||||
int len = ASN1_STRING_to_UTF8((unsigned char**)&buffer,
|
||||
alt_name->d.ia5);
|
||||
cert_names.push_back(buffer);
|
||||
if (len > 0) {
|
||||
cert_names.push_back(string(buffer, len));
|
||||
}
|
||||
if (buffer != NULL) {
|
||||
OPENSSL_free(buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cert_names.empty()) {
|
||||
// If there were no DNS names, use the common name instead.
|
||||
|
Loading…
x
Reference in New Issue
Block a user