Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 945485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:45:31+00:00 2026-05-15T22:45:31+00:00

I’m currently rewriting some existing technologies that were once using RSA Security’s libraries into

  • 0

I’m currently rewriting some existing technologies that were once using RSA Security’s libraries into OpenSSL, but I’m starting to run into a few issues. Currently, all of the certificate verification code appears to be running without a hitch, until that is, I call SSL_connect().

Before, the call to SSL_connect() would produce SSL_ERROR_WANT_READ.

An answer to this issue on another forum suggested to me that SSL_connect() should be called until it stops producing SSL_ERROR_WANT_READ errors. Unforunately, this only produces something more confusing:

error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

even though SSL_CTX_load_verify_locations() succeeds. Does anyone have any idea as to why a verification error wouldn’t register with certificate methods and wait until SSL_connect() is triggered?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:45:31+00:00Added an answer on May 15, 2026 at 10:45 pm

    Usually this error means that the server certificate your client received in response to SSL_connect() couldn’t be verified.

    This can happen for different reasons:

    • If the server certificate is self-signed, you’ll have to authorize that on your SSL_CONTEXT.
    • If the server certificate was signed by a certificate authority that is not in the list of trusted CA certificates
    • If the server certificate is not valid yet or not valid anymore

    Actually, you should set a callback for certificate verification and make it accept any certificate, so you can focus on the connection part. Once it works, just tweak your callback or check your certificates to be valid.

    At any time you get a failure, you can call some SSL_get_error() function that will indicate you why the certificate was rejected.

    (Unfortunately, I can’t access my code base right now, so I cannot give concrete examples)


    Here are some code samples from my own SSL Socket wrapper class, adapted for you:

    // ctx is a SSL_CONTEXT
    // internalCertificateVerificationCallback is a callback static method (or function)
    ctx->setVerify(SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, internalCertificateVerificationCallback);
    

    Here is the definition for internalCertificateVerificationCallback:

    int SecureSocket::internalCertificateVerificationCallback(int preverify_ok, X509_STORE_CTX* x509_ctx)
    {
      //preverify_ok contains 1 if the pre-verification succeeded, 0 otherwise.
    
      return 1; // This accepts every certificate
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.