return s->tlsext_hostname;
}
-EVP_MD_CTX* EVP_MD_CTX_new() {
+unsigned char* ASN1_STRING_get0_data(const ASN1_STRING* x) {
+ return ASN1_STRING_data((ASN1_STRING*)x);
+}
+
+EVP_MD_CTX* EVP_MD_CTX_new(void) {
EVP_MD_CTX* ctx = (EVP_MD_CTX*)OPENSSL_malloc(sizeof(EVP_MD_CTX));
if (!ctx) {
throw std::runtime_error("Cannot allocate EVP_MD_CTX");
int BIO_meth_set_write(BIO_METHOD* biom, int (*write)(BIO*, const char*, int));
const char* SSL_SESSION_get0_hostname(const SSL_SESSION* s);
+unsigned char* ASN1_STRING_get0_data(const ASN1_STRING* x);
EVP_MD_CTX* EVP_MD_CTX_new();
void EVP_MD_CTX_free(EVP_MD_CTX* ctx);
return none;
}
- auto cnData = reinterpret_cast<const char*>(ASN1_STRING_data(cnAsn));
+ auto cnData = reinterpret_cast<const char*>(ASN1_STRING_get0_data(cnAsn));
auto cnLen = ASN1_STRING_length(cnAsn);
if (!cnData || cnLen <= 0) {
return none;
if (!genName || genName->type != GEN_DNS) {
continue;
}
- auto nameData =
- reinterpret_cast<const char*>(ASN1_STRING_data(genName->d.dNSName));
+ auto nameData = reinterpret_cast<const char*>(
+ ASN1_STRING_get0_data(genName->d.dNSName));
auto nameLen = ASN1_STRING_length(genName->d.dNSName);
if (!nameData || nameLen <= 0) {
continue;