File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -480,17 +480,14 @@ MaybeLocal<Object> GetLastIssuedCert(
480480 return MaybeLocal<Object>();
481481 issuer_chain = ca_info;
482482
483- // Take the value of cert->get() before and after the call to cert->reset()
484- // in order to compare them and provide a way to exit this loop
485- // in case it gets stuck
486- X509* value_before_reset = cert->get ();
483+ // Take the value of cert->get(), compare it with the value of ca
484+ // and provide a way to exit this loop
485+ // in case it gets stuck.
486+ if (cert->get () == ca)
487+ break ;
487488
488489 // Delete previous cert and continue aggregating issuers.
489490 cert->reset (ca);
490-
491- X509* value_after_reset = cert->get ();
492- if (value_before_reset == value_after_reset)
493- break ;
494491 }
495492 return MaybeLocal<Object>(issuer_chain);
496493}
You can’t perform that action at this time.
0 commit comments