Giter Site home page Giter Site logo

Test failure with OpenSSL 3.1.0 about openssl HOT 3 CLOSED

nobu avatar nobu commented on June 12, 2024
Test failure with OpenSSL 3.1.0

from openssl.

Comments (3)

rhenium avatar rhenium commented on June 12, 2024

I haven't been able to reproduce this locally with OpenSSL 3.1.0 on Linux. The message contains certificate verify failed (self-signed certificate in certificate chain) as expected.

The test case OpenSSL::TestSSL#test_connect_certificate_verify_failed_exception_message does want to check the /self.signed/ part because it was introduced by #99, which tried to add some context as to why the certificate verification failed.

Seems like SSL_R_TLSV1_ALERT_UNKNOWN_CA is returned instead of SSL_R_CERTIFICATE_VERIFY_FAILED?

SSL_R_TLSV1_ALERT_UNKNOWN_CA is a server-side error (server receiving an alert). Since an error queue is created for each native thread, it should not get mixed with client-side errors.

from openssl.

rhenium avatar rhenium commented on June 12, 2024
Expected /self.signed/ to match "SSL_connect SYSCALL returned=5 errno=0 peeraddr=127.0.0.1:53969 state=error: certificate verify failed".

SSL_get_error() returned SSL_ERROR_SYSCALL instead of SSL_ERROR_SSL, but with errno == 0. This looks strange.

from openssl.

rhenium avatar rhenium commented on June 12, 2024

The man page of SSL_get_error() says:

       SSL_ERROR_SYSCALL
           Some non-recoverable, fatal I/O error occurred. The OpenSSL error queue may contain more information on the error. For socket I/O on Unix
           systems, consult errno for details. If this error occurs then no further I/O operations should be performed on the connection and
           SSL_shutdown() must not be called.

           This value can also be returned for other errors, check the error queue for details.

       SSL_ERROR_SSL
           A non-recoverable, fatal error in the SSL library occurred, usually a protocol error.  The OpenSSL error queue contains more information on
           the error. If this error occurs then no further I/O operations should be performed on the connection and SSL_shutdown() must not be called.

Also, Google search "SSL_connect SYSCALL returned=5 errno=0 state=error: certificate verify failed" gives many hits of articles written several years ago; this may not be new in OpenSSL 3.1.0.

#640 should fix this... but since I haven't reproduced the error in my local environment, it's not been tested.

from openssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.