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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:08:56+00:00 2026-06-11T13:08:56+00:00

i will provide you with my question clearly so you can answer me I

  • 0

i will provide you with my question clearly so you can answer me

I have a client-server (socket) connection that i secured using SslStream and as i know using ssl makes me sure that my client will only connect to my server

And to do that i must add a function to my client to validate the server certification and make sure that the server is the real one (my server)

but i really don’t get how could i validate my self-signed certification and want your help

Regards, and my thanks in advance

  • 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-11T13:08:57+00:00Added an answer on June 11, 2026 at 1:08 pm

    Imagine if the certificate were not self signed – it is signed by a trusted certificate authority. The reason it works is because your client device – windows, mac, linux, iphone, android device already has the certificates of all the well known certificate authorities. The operating system does the work for you when you make the connection. It ensures that the certificate sent to the client during the connection is signed by a well known certificate authority. The only reason this works though is because the client already has the certificates for all the well know certificate authorities.

    If you choose to use a self-signed certificate – or a certificate signed by a self-signed certificate authority – you have to do the work, instead of the operating system. However – the task is basically the same – you need to verify that that the certificate sent to the client during the connection matches what is expected. And you will need to use the same strategy that signed certificates use – your client has to have the expected certificate (or certificate chain) pre-installed.

    Some how, some way you need to ensure that your client already has the self signed certificate. Specifically all the public information in the certificate. The client will not have the private key – since that is … private. Then you can add code to your app verify that the hash of the certificate sent during the connection matches the hash of the certificate that was pre-installed.

    I noticed you have asked a similar question before and you may know all this already. Here is one additional point:

    As long as you keep the private key of your self-signed certificate absolutely secure, there is no way anyone can fake your self signed certificate. It just cannot be done. If someone tries, they will have to generate a new private key which won’t match yours – because they do not know your private key because you kept it secure.

    Then everything breaks down. If they have a different private key, they will need a different public key. This means they will have a different certificate hash. And your app already knows the correct public key and hash (as described above), so when they try to come in with their bad public key and hash your app will reject the connection. This is part that you have to do in your application.

    If they attempt to use your public key and hash but with a different private key, SSL will not allow them to make the connection.

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

Sidebar

Related Questions

Does Facebook provide a URL the user can access that will take him to
We have a scenario where we have built an API that we will provide
Is there a web-service/API that will provide information on who the US State and
I am writing a library that will provide a collection of public types to
I am designing a website that will provide continuing education courses via streaming video.
I am currently designing a class library that will provide data to a web
I'm trying to create a generic class in PHP that will provide a way
I have recently been asked to estimate a piece of work which will provide
I'm going to try to explain this best I can I will provide more
I need to put together a data structure that will efficiently provide keyword search

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.