<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hmmm, it’s a bug introduced by the use of RSA_check_key_ex function. Thanks for reporting.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 28 Jul 2017, at 19:16, Georg Höllrigl <<a href="mailto:georg.hoellrigl@gmx.at" class="">georg.hoellrigl@gmx.at</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="font-family: Verdana;font-size: 12.0px;" class=""><div style="font-family: Verdana;font-size: 12.0px;" class="">
<div class="">Hello,</div>

<div class=""> </div>

<div class="">I think there is something broken with verifying the Private Key with "openssl rsa -check" like it was described in <a href="https://blog.hboeck.de/archives/888-How-I-tricked-Symantec-with-a-Fake-Private-Key.html" target="_blank" class="">https://blog.hboeck.de/archives/888-How-I-tricked-Symantec-with-a-Fake-Private-Key.html</a></div>

<div class=""> </div>

<div class="">I tried to implement better checking in a script that tells me if a key matches a certificate or certificate request.</div>

<div class=""> </div>

<div class="">To reproduce, get the fake private key from <a href="https://github.com/hannob/tlshelpers/blob/master/examples/symantec.key" target="_blank" class="">https://github.com/hannob/tlshelpers/blob/master/examples/symantec.key</a></div>

<div class=""> </div>

<div class="">Verify the key with openssl 1.0.1e-fips or 1.0.2h:</div>

<div class="">$OPENSSL rsa -in symantec-broken.key -check -noout<br class="">
RSA key error: n does not equal p q</div>

<div class=""> </div>

<div class="">Verify the key with openssl 1.1.0c or 1.1.0f (gives no output)</div>

<div class="">$OPENSSL rsa -in symantec-broken.key -check -noout</div>

<div class=""> </div>

<div class=""> </div>

<div class="">I would expect 1.1.0 to report the faked key in some way.</div>

<div class="">Even the returnvalue for openssl returns with a 0 no matter if used a legimate key or a faked key.</div>

<div class=""> </div>

<div class=""> </div>

<div class=""> </div>

<div class="">Kind Regards,</div>

<div class="">Georg</div>
</div></div></div>
-- <br class="">openssl-users mailing list<br class="">To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" class="">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>