Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issues while connectiong with SSL Certificate #62

Open
FWDQK opened this issue Feb 17, 2023 · 12 comments
Open

Facing issues while connectiong with SSL Certificate #62

FWDQK opened this issue Feb 17, 2023 · 12 comments

Comments

@FWDQK
Copy link

FWDQK commented Feb 17, 2023

Hi Team,

I am getting below error while connecting AS400 Server with SSL certificate.
I used -clientcert argument and pass Name of certificate from Personal Certificare Store.
Could you please help me to solve the error.

image

@pmattes
Copy link
Owner

pmattes commented Feb 19, 2023

This is the error message given when the Windows SChannel code cannot find the certificate. What name did you use with '-clientcert'? wc3270 is looking for the Friendly Name of the cert, which I just verified still works properly.

@FWDQK
Copy link
Author

FWDQK commented Feb 20, 2023

Hi @pmattes please refer below steps I have tried.

Capture
image

@pmattes
Copy link
Owner

pmattes commented Feb 20, 2023

My best guess is that Windows is able to find your certificate, but is not happy with it. The expiration date 543 years in the future looks a little fishy -- is this an actual certificate issued by the administrators of the host you are trying to connect to, or something you created yourself?

I know that TLS-related options can be fiendishly tricky to get right. Unfortunately this is an intrinsic property of the TLS protocol itself.

Could you explain a bit more about what it is you are trying to do with TLS?

@robinmatz
Copy link

@FWDQK

I think you might have imported the certificate into the wrong certificate store. Your certificate is in Certificates - Local Computer. However, it should be in Certificates - Current User. I just verified that I got the above error message when the certificate was in the store for the local computer, but not when it was in the store for the current user.

@FWDQK
Copy link
Author

FWDQK commented Feb 21, 2023

Hi I added certificate in Current User and now I got below error, Is this is the problem with TLS certificate.
image

@pmattes
Copy link
Owner

pmattes commented Feb 21, 2023

@robinmatz, I missed this -- excellent catch! I have updated the Wiki to make this explicit.

@FWDQK, yes, it appears that Windows has found your certificate now, but does not like its contents.

@robinmatz
Copy link

@FWDQK
I was able to reproduce the error message you are getting. This happened when I imported the certificate as .pem (or .crt, or .cer) with content as plain text into the store. In this case, when importing, the certificate store did not ask me for the certificate's passphrase. I suppose this is what is happening in your case.

To verify, could you please post a screenshot for every step you take when importing the certificate into your personal store?

@FWDQK
Copy link
Author

FWDQK commented Feb 23, 2023

@robinmatz I followed below steps to import the certificate.

image
image
image
image
image

@robinmatz
Copy link

robinmatz commented Feb 23, 2023

@FWDQK
Just as I thought.

For clarification:
What does the content of your certificate file look like.

Does it start with
----- BEGIN CERTIFICATE -------

or

----- BEGIN RSA PRIVATE KEY ------

or does it contain multiple such sections?

@FWDQK
Copy link
Author

FWDQK commented Feb 23, 2023

@robinmatz I have .cer file which looks like this.
image

@robinmatz
Copy link

@FWDQK
What strikes me about the content is that the valid from date is also more than 500 years in the future.

Could you ask your server admin to issue a new certificate with valid starting date (and also a more reasonable ending date)?

@FWDQK
Copy link
Author

FWDQK commented Mar 2, 2023

@robinmatz the validity is not actually 500 years in the future, it is an 2023 by gregorian calendar and 2566 by Thai Calendar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants