Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypto: fix to check ext method for shared lib #800

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1099,15 +1099,9 @@ void SSLWrap<Base>::OnClientHello(void* arg,


static bool SafeX509ExtPrint(BIO* out, X509_EXTENSION* ext) {
// Only alt_name is escaped at the moment
if (OBJ_obj2nid(ext->object) != NID_subject_alt_name)
return false;

const X509V3_EXT_METHOD* method = X509V3_EXT_get(ext);
if (method == NULL || method->it == NULL)
return false;

if (method->i2v != reinterpret_cast<X509V3_EXT_I2V>(i2v_GENERAL_NAMES))
if (method != X509V3_EXT_get_nid(NID_subject_alt_name))
return false;

const unsigned char* p = ext->value->data;
Expand Down