Home > Tech stuff > SSL

SSL

All scenarios:
1. Two Keystores, Two self-created CA, Server and client.
Keystores: CentralServer-keystore, Storeserver-keystore.
CentralServer-keystore has ROOTCA as trustedCertEntry, storeserver as a privateKeyEntry and the public key being singed by the CA.
StoreServer-keystore has ROOTCAISS, centralserver as the privateKeyEntry.

Exception thrown:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Storeserver-keystore needs the have ROOTCA. It works.

When Client uses SSLSocketFactory and Server is listening in HTTP.

main, handling exception: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
main, SEND TLSv1 ALERT:  fatal, description = unexpected_message
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 01 00 02 02 0A                               .......
main, called closeSocket()
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
	at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:523)
	at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
Categories: Tech stuff
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment