Skip to content

Instantly share code, notes, and snippets.

@MayankPandey01
Created December 20, 2021 17:29
Show Gist options
  • Save MayankPandey01/e7e6a66a4abbd968b07c760571e9adc8 to your computer and use it in GitHub Desktop.
Save MayankPandey01/e7e6a66a4abbd968b07c760571e9adc8 to your computer and use it in GitHub Desktop.
//bad code
if (!SafeX509ExtPrint(bio.get(), ext)) {
CHECK_EQ(1, X509V3_EXT_print(bio.get(),
//good code
if (!SafeX509ExtPrint(bio.get(), ext) &&
X509V3_EXT_print(bio.get(), ext, 0, 0) != 1) {
info->Set(context, keys[i], Null(env->isolate())).Check();
USE(BIO_reset(bio.get()));
continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment