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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:17:20+00:00 2026-05-22T19:17:20+00:00

My experience with the SSL/TLS protocol and then OpenSSL library is very limited. Essentially

  • 0

My experience with the SSL/TLS protocol and then OpenSSL library is very limited. Essentially I started learning about it this week, yet I feel proud of the amount of knowledge I have learned thus far.

I do have a lingering question though and haven’t been able to find the answer. I’ve tried Googling it and looking into other resources available to me but it seems I don’t know how to properly ask my question. It has to do with the handshake procedure and what happens if the client already has the server certificate?

I understand that the initial part of the handshake involves these high-level steps:

  1. Client sends hello message
  2. Server responds with its own hello message
  3. Server sends certificate
  4. Client verifies the server certificate
  5. Server sends message indicating that negotiation is done

I just can’t seem to figure out how this procedure would work when the client already has the server certificate. I know that session ids can be used to do a resumed handshake where only the hello messages are sent and then a message stating any data after this message is encrypted, thus avoiding key generation in the asymmetric handshake. But using those session ids doesn’t seem like a good idea to me as essentially they would have to last a very long long time which may pose security issues (I don’t know how but it just seems bad to have a very long persisting session id. Maybe I am wrong through). I figured that the behavior may be similar to that of a web browser but failed to find any information on that road.

I went and looked at the OpenSSL API to do some research and it also left lingering questions. The API method:

int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);

when initializing/setting up all my OpenSSL structs made me think that this would be the servers certificate file if it already existed. But I did further research and it can be used for both client and server applications. So in the case where I am a client and DON’T have the server certificate yet would I just forgo using the above API method before calling the SSL_connect() API to do the SSL handshake? I guess if this was the case I would somehow use the OpenSSL APIs to save the server certificate as well?

Thanks for reading my post. I appreciate any help/guidance/pointers you may be able to offer. If my questions/thoughts aren’t clear please let me know and I will try to clarify them.

  • 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-22T19:17:20+00:00Added an answer on May 22, 2026 at 7:17 pm

    You seem to be conflating caching the certificate ("client already has the server certificate") with caching the connection state ("avoiding key generation in the asymmetric handshake").

    There is certainly no security issue with caching the server certificate. It does not matter how you get that certificate, because it is totally public information; its purpose is to convey the server’s public key to you. The key negotiation will only work if the server has the corresponding private key, regardless of how you obtain the certificate.

    However, I do not know whether the OpenSSL API (or the SSL protocol, for that matter) allows you to assume you already have the server’s certificate and skip that part of the handshake. As you already figured out, SSL_CTX_use_certificate_file() is what you invoke on the client to identify the client certificate. And it is what a Web server would invoke to identify its own server certificate. It is not for identifying the server certificate on the client or vice-versa.

    As for re-using an existing session ID (to skip key generation entirely), that is also plenty secure. At least, it is no worse than having a long-lived SSL connection. And if anybody discovered a problem with that, the result would be worth a Ph.D. at least.

    [update on resuming sessions]

    Section 7.3 of RFC 5246 has an overview of the SSL handshake, including the case where you resume a session. Resuming a session means you get to skip exchanging and verifying certificates and jump right into the encrypted session, starting with a ChangeCipherSpec message to negotiate the secret key.

    Incidentally, I do not think it is common to resume SSL sessions in practice. The handshake is not that slow, and preserving the state is annoying. To my knowledge, Web browsers and servers do not generally use this feature; they just do the full handshake on every SSL connection.

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

Sidebar

Related Questions

Possible Duplicate: Android NoSuchAlgorithmException: SSLContext SSL implementation not found Has anybody experience with this
Has anyone had experience using SSL with net.tcp binding in WCF? Ive read its
My experience with MySQL is very basic. The simple stuff is easy enough, but
My experience with application servers is limited to some basic servlet coding, so I
Debugging experience http://www.dmhermitage.org/wtfborders.png This is making me want to kill myself. I have some
Although I might pretend very well that I know a thing about networks or
I have a Class library application in which I'm trying to use SSL connection.
I have a tcp server which uses certificates for ssl/tls and licensing. For the
I configured an instance of Tomcat following this article: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html . I commented out
Disclaimer: I have no experience in signing the files and this is my first

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.