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 8220975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:44:11+00:00 2026-06-07T13:44:11+00:00

In openssl, I can get the errorno for the certificate from using the code

  • 0

In openssl, I can get the errorno for the certificate from using the code :

if(SSL_get_peer_certificate(ssl) != NULL){
    if((error = SSL_get_verify_result(ssl)) != X509_V_OK){
        std::cout << "error no = " << error << std::endl;
    }
}

But if I try to get the error string from this error like this:

std::string temp = ERR_error_string(SSL_get_verify_result(ssl), NULL) ;

all i get is:

error:00000013:lib(0):func(0):reason(19)

Is there any way to get the exact reason here?
I have loaded the error strings using this code:

SSL_load_error_strings();

But still i dont get the exact reason. And if i try to use
std::string a = ERR_reason_error_string(19);, The program crashes. What am I doing wrong?

  • 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-06-07T13:44:15+00:00Added an answer on June 7, 2026 at 1:44 pm

    Please use the function X509_verify_cert_error_string to get errors related to Verification of Certificates in OpenSSL. ERR_error_string gives error strings for other SSL lib related errors not for the certificate verification failure specific errors.

    As for the crash, there is no reason code mapping to the value 19. All SSL error reason codes start from 100. So, ERR_reason_error_string must be returning NULL which is causing your code to crash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using openssl to get data about x509 certificate. Is there a way
I am trying to implement a DTLS server using OpenSSL. I can get app
I'm using openssl to parse X509 certificate. I manage to get extensions, but I
I'm using the openssl utility of debian in order to create a certificate. The
I have generated using openssl mycert.pem which contents the certificate. And I converted the
I want to use DTLS (on OpenSSL) using JNI on Android 2.1/2.2. Can someone
I am trying to use openssl to get a certificate, and it seems to
I get an error response from the .save() function. The server side php returns
From the code below I am trying to get the result of the result
seems I get this error from Koala when I'm trying to connect with the

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.