如何以安全的方式为HTTPS配置OpenSSL? [英] How to configure OpenSSL in a secure way for HTTPS?

查看:191
本文介绍了如何以安全的方式为HTTPS配置OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个月都有一些文章在网络上关于一些应用程序或平台使用过时的加密配置在其SSL实现。这让我担心...我自己的实现呢?

Every month there are articles on the web about some app or platform using outdated crypto configurations in its SSL implementation. This has gotten me worried... what about my own implementations?

当我在应用中使用OpenSSL时,我应该如何做最安全的配置服务和/或使用HTTPS? (例如与cURL结合使用)

What exactly should I do to configure OpenSSL in the most secure fashion when I use it in an app for serving and/or consuming HTTPS? (e.g. in combination with cURL)

除配置外,还必须采取哪些其他步骤来确保OpenSSL安全使用?是否有任何特殊的步骤,我应该采取,例如。关于公钥基础设施?

Aside from configuration, what other steps must be taken to ensure that OpenSSL is used securely? Are there any special steps I should take, e.g. in relation to the public key infrastructure?

网络上是否有一些已知的好配置?

Is there some "known good" configuration available on the web?

推荐答案

确保您的证书提供商使用SHA1或更好的(SHA2首选)散列签名您的证书。

Ensure that your certificate provider signs your certificate with a SHA1 or better (SHA2 preferred) hash.

HTTPS )仅在验证证书时有效。这通常由客户端执行。如果客户端通过验证证书不验证服务器的身份,您将受到中间人攻击。

HTTPS (SSL/TLS) is only effective if you verify the certificate. This is most commonly performed by the client. If the client does not verify the identity of the server by verifying the certificate, you are subject to man in the middle attacks.

您可以配置服务器不允许旧的(SSL)协议,而是需要最新的TLS协议,这是加密更强的(例如,在伪随机函数中的SHA1和MD5,而不仅仅是TLS 1.0中的MD5,TLS 1.2使用SHA2)。

You can configure the server so that it does not allow the older (SSL) protocol, and instead requires the latest TLS protocol, which is cryptographically stronger (e.g. SHA1 and MD5 in the pseudo-random function instead of just MD5 in TLS 1.0, and TLS 1.2 uses SHA2).

在创建证书密钥对时,选择较长的密钥(例如,2048位优先于1024位)。

When creating your certificate key pair, choose a longer key (e.g. 2048 bit is preferred over 1024 bit).

是关于Mozilla Wiki的一些好建议:
安全/服务器端TLS

There are some good recommendations on the Mozilla wiki: Security/Server Side TLS

这篇关于如何以安全的方式为HTTPS配置OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆