我想使用我的网站的公钥解密在客户端加密的消息:
URL httpsURL = new URL("https://mediashuttle.com/");
HttpsURLConnection connection = (HttpsURLConnection) httpsURL.openConnection();
connection.connect();
Certificate cert = connection.getServerCertificates()[0];
PublicKey publicKey = cert.getPublicKey();
现在在服务器(Tomcat)端,我想解密传递给 Servlet 的消息。你能告诉我如何在 Tomcat 中检索私钥来解密消息吗?
谢谢!