简体   繁体   中英

Java: how to get ssl session data from ssl certificate?

I have an SSL Certificate that is represented by sun.security.x509.X509CertInfo . It contains different data on Organization, Organization Unit, Domain name and so on. But I need to get Protocol and Cipher data.

SSLSession interface has methods to retrieve this data getProtocol() and getCipherSuite() . Is it possible to retrieve this data (Protocol and Cipher) having only SSL Certificate object?

No, simply because a certificate does not contain that information. It's setup during the protocol negotiation part of SSL, and is mostly independent of the certificate properties.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM