Servlets 密钥库文件在SSL中扮演什么角色?

Servlets 密钥库文件在SSL中扮演什么角色?,servlets,security,keystore,Servlets,Security,Keystore,由于对SSL完全陌生,我最终设法使用https运行我的应用程序: 在tomcat服务器中,我添加了 <Connector port="8443" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="true" disableUploadTimeout="true" acceptCount="100" debug="0" scheme="https" secure="true"

由于对SSL完全陌生,我最终设法使用https运行我的应用程序:

在tomcat服务器中,我添加了

    <Connector port="8443"
    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
    clientAuth="false" sslProtocol="TLS"
    keystoreFile="c:/keystore.key"
    keystorePass="mypassword" 
    SSLEnabled="true" />

我的应用程序仍然以https运行?我有没有这个文件有什么区别?我真的说不出来?

私钥用于SSL握手的身份验证阶段,用于签署您提供的证书。对等方通过证书的公钥验证签名。这证明您拥有证书,因为只有您可以使用与其公钥对应的私钥对其进行签名,因为只有您拥有私钥,因为它是私钥。这是建立身份的一部分,即身份验证

如果服务器需要或想要客户端身份验证,SSL客户端只需要私钥、证书、密钥库等


服务器的私钥还用于生成共享密钥的初始阶段,而共享密钥又用于生成会话的会话密钥。数据由会话密钥加密。

删除文件后是否重新启动了Tomcat?重新启动服务器后,我意识到。。它从来都不起作用。如果你删除了那个文件,你只需要重建它。这是你的私钥,很珍贵,别再丢了。很快,您将希望从中生成CSR,以获得CA签署的证书。
 <user-data-constraint>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
 </user-data-constraint>
keytool -genkey -alias tomcat -keypass pass -keystore keystore.key -storepass pass