Fixes for OpenSSL 1.1 support

The following tests currently fail due to what seems like different
behavior in OpenSSL 1.1 vs 1.0:

    scripts/base/protocols/rdp/rdp-x509.bro
    bifs/x509_verify.bro
This commit is contained in:
Jon Siwek 2018-06-29 15:58:53 -05:00
parent e33a3a9c02
commit 8f990036f6
5 changed files with 425 additions and 59 deletions

View file

@ -290,7 +290,11 @@ void file_analysis::X509::ParseSAN(X509_EXTENSION* ext)
continue;
}
#if ( OPENSSL_VERSION_NUMBER < 0x10100000L )
const char* name = (const char*) ASN1_STRING_data(gen->d.ia5);
#else
const char* name = (const char*) ASN1_STRING_get0_data(gen->d.ia5);
#endif
StringVal* bs = new StringVal(name);
switch ( gen->type )