简体   繁体   English

使用 Thales Luna HSM 中存在的证书建立 SSL/TLS 连接

[英]Establish SSL/TLS Connection using Certificate present in Thales Luna HSM

I am trying to setup a Netty Server with HTTPS enabled.我正在尝试设置启用了 HTTPS 的 Netty 服务器。 In order to establish the SSL/TLS connections, I need to fetch the certificiate from Saf.net Luna Network HSM and pass that Cert to Netty's SSL Context.为了建立 SSL/TLS 连接,我需要从 Saf.net Luna Network HSM 获取证书并将该证书传递给 Netty 的 SSL 上下文。

I have generated a keypair in the Luna HSM and then generate a self sign certificate using the generated keypair.我在 Luna HSM 中生成了一个密钥对,然后使用生成的密钥对生成了一个自签名证书。 So now my self sign cert is present inside the HSM and I need to use that cert to establish TLS connections by initializing the SSL Context.所以现在我的自签名证书存在于 HSM 中,我需要使用该证书通过初始化 SSL 上下文来建立 TLS 连接。 According to the usgae of HSM we should not extract our cert and private key details outside of the HSM box.根据 HSM 的 usgae,我们不应该在 HSM 框外提取我们的证书和私钥详细信息。

Then how can i establish a TLS connection by using the certificate present inside Luna Network HSM.那么我如何使用 Luna Network HSM 中存在的证书建立 TLS 连接。

I have tried to fetch the certiciate from HSM box by using the alias name of the certificate and later use that to initialize the SSL context but no luck.我试图通过使用证书的别名从 HSM 框中获取证书,然后使用它来初始化 SSL 上下文,但没有成功。

My expectation is to establish TLS connections by using the generated certificate directly from HSM to initilaize SSL Context without extartcting any information oustide of the HSM box.我的期望是通过使用直接从 HSM 生成的证书来建立 TLS 连接来初始化 SSL 上下文,而无需提取 HSM 框之外的任何信息。

Thanks谢谢

So HSM works on 2way handshake to establish mutual trust, So HSM over HTTPS needs the following configuration:所以HSM工作在2way握手建立互信,所以HSM over HTTPS需要如下配置:

From the client side: The client will have a self-signed certificate of the HSM host stored inside its own trust store.从客户端:客户端将在其自己的信任库中存储 HSM 主机的自签名证书。

On top of the client will have its own key pair of let's say RSA 2048 stored in keystore在客户端之上将有自己的密钥对,假设 RSA 2048 存储在密钥库中

From the HSM side: HSM will have a self-signed certificate received from the client (public key of rsa keypair) inside its trust store.从 HSM 端: HSM 将在其信任库中从客户端收到自签名证书(rsa 密钥对的公钥)。

in a similar way its own key-store pair to communicate to client以类似的方式它自己的密钥存储对与客户端通信

End result: Each party has trust between them (as they have their certificates loaded inside truststore) and a key pair to share messages in an encrypted format.最终结果:每一方都相互信任(因为他们将证书加载到信任库中)和密钥对以加密格式共享消息。

Article to get you started: https://dzone.com/articles/implementing-one-way-and-two-way-ssl-mutual-authen入门文章: https://dzone.com/articles/implementing-one-way-and-two-way-ssl-mutual-authen

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Web 作业无法与客户端证书建立 SSL/TLS 连接 - Azure Web Job not able to establish SSL/TLS connection with client certificate 使用 Java 建立到 MySQL Amazon RDS (SSL/TLS) 的安全连接 - Using Java to establish a secure connection to MySQL Amazon RDS (SSL/TLS) 如何使用ssl证书建立双向连接? - How to establish a bi directional connection with ssl certificate? 具有有效证书的“无法为SSL / TLS安全通道建立信任关系” - “Could not establish trust relationship for the SSL/TLS secure channel” with valid certificate 客户端证书:无法为具有权限的SSL / TLS建立安全通道(再次!) - Client certificate: Could not establish secure channel for SSL/TLS with authority (Again!) C#应用程序无法建立SSL / TLS连接 - C# application unable to establish SSL/TLS connection SslHandshakeException:尝试建立 SSL 或 TLS 连接时发生错误 - SslHandshakeException: An error occurred while attempting to establish an SSL or TLS connection 尝试建立 SSL 或 TLS 连接时出错 - An error occurred while attempting to establish an SSL or TLS connection 使用TLS / SSL可信证书可提高性能 - Using TLS/SSL trusted certificate improved performances 无法与主题备用名称证书建立SSL / TLS安全通道的信任关系 - Could not establish trust relationship for the SSL/TLS secure channel with subject alternative name certificate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM