B4J Question WebApp: SSL & .pfx question.

amykonio

Active Member
Licensed User
Longtime User
Hi.

This is not a B4J question but it is related to using certificates. Actually I was asked to use a specific certificate to a B4J WebApp. I ask it here because there is people that have some expirience with SSL.
I do have a specific pfx certificate. I do add it to .keystore using the following command (I found it here -> java - How to convert .pfx file to keystore with private key? - Stack Overflow):
keytool -importkeystore -srckeystore <mypfxfile>.pfx -srcstoretype pkcs12

I then “link” it to a web application. The application loads fine. But the certificate show as unsecure. When I see the certificate I see a difference compared to the original one:
1634971857356.png

On the left side the original, on the right side the one generated with keytool and used by Jetty. Does anyone knows why the private key that corresponds to the certificate is missing?

Thanks.

Andreas.
 

amykonio

Active Member
Licensed User
Longtime User
I guess that this message means that the original certificate file includes the private key.

As this is a self signed certificate, you need to install the certificate on your PC.
Thank you Erel.
I will do some additional testing.
What confuses me is that the above discussion (https://stackoverflow.com/questions/4217107/how-to-convert-pfx-file-to-keystore-with-private-key) was about "How to convert .pfx file to keystore with private key?", so I though I should not end up with a file without private key.

Andreas.
 
Upvote 0

amykonio

Active Member
Licensed User
Longtime User
Hi.
About the issue that I was facing with certificates, I found out that only in my developer pc it shows as unsecure. I believe that somehow a previous version is chached somewhere. But I don't know where. Anyway, what's important is that we have the wab app working fine now using ssl.


Erel, thanks for that link and help.

Andreas.
 
Upvote 0
Top