Encryption 限制OpenSSL服务器密码选项

Encryption 限制OpenSSL服务器密码选项,encryption,openssl,Encryption,Openssl,在我们当前的环境中,安全运行扫描以查找漏洞。OpenSSL(当前版本)不断出现一个问题,4-5个密码低于128kb的加密级别,并标记扫描仪 知道客户端必须指定选项,在某些情况下,最好限制服务器接受低密码的选择。如果可以做到这一点,那么客户机的请求就无关紧要了。有一个关于接受什么的配置选项有意义吗 在我的具体案例中,我们正在试用一个用于文件传输的测试版软件,它将openSSL密码拉入其客户机。目前没有限制这一点的选项 我还向beta软件开发人员提出了一个类似的问题。您可以使用SSL\u CTX\u

在我们当前的环境中,安全运行扫描以查找漏洞。OpenSSL(当前版本)不断出现一个问题,4-5个密码低于128kb的加密级别,并标记扫描仪

知道客户端必须指定选项,在某些情况下,最好限制服务器接受低密码的选择。如果可以做到这一点,那么客户机的请求就无关紧要了。有一个关于接受什么的配置选项有意义吗

在我的具体案例中,我们正在试用一个用于文件传输的测试版软件,它将openSSL密码拉入其客户机。目前没有限制这一点的选项


我还向beta软件开发人员提出了一个类似的问题。

您可以使用
SSL\u CTX\u set\u cipher\u list()
来限制密码列表

#include <iostream>
#include <openssl/ssl.h>

// List of allowed ciphers in a colon-seperated list. Example limits ciphers to AES-256 only
const char *allowedCiphers = "AES256-SHA256:AES256-GCM-SHA38:DHE-RSA-AES256-SHA256";

bool SetCiphers(SSL *sslContext, const char *ciphers);

int main()
{
   // Create a ssl context here etc.
   SSL *ssl = ...;

   // Set the allowed ciphers
   if (!SetCiphers(ssl, allowedCiphers))
      exit(-1);

   // Process...
   return 0;
}

bool SetCiphers(SSL *sslContext, const char *ciphers)
{
   if (SSL_CTX_set_cipher_list(sslContext, ciphers) != 1)
   {
      std::cerr << L"[SSL_CTX_set_cipher_list] failed; could not find a suitable cipher in the provided list of ciphers \"" 
         << ciphers << "\"." << endl;
      return false;
   }
   return true;
}
#包括
#包括
//冒号分隔列表中允许的密码列表。示例将密码仅限于AES-256
const char*allowedCiphers=“AES256-SHA256:AES256-GCM-SHA38:DHE-RSA-AES256-SHA256”;
布尔集合密码(SSL*sslContext,常量字符*密码);
int main()
{
//在此处创建ssl上下文等。
SSL*SSL=。。。;
//设置允许的密码
if(!SetCiphers(ssl,allowedCiphers))
出口(-1);
//过程。。。
返回0;
}
布尔集合密码(SSL*sslContext,常量字符*密码)
{
如果(SSL\U CTX\U set\U密码\U列表(sslContext,密码)!=1)
{

您可以使用
SSL\u CTX\u set\u cipher\u list()
来限制密码列表

#include <iostream>
#include <openssl/ssl.h>

// List of allowed ciphers in a colon-seperated list. Example limits ciphers to AES-256 only
const char *allowedCiphers = "AES256-SHA256:AES256-GCM-SHA38:DHE-RSA-AES256-SHA256";

bool SetCiphers(SSL *sslContext, const char *ciphers);

int main()
{
   // Create a ssl context here etc.
   SSL *ssl = ...;

   // Set the allowed ciphers
   if (!SetCiphers(ssl, allowedCiphers))
      exit(-1);

   // Process...
   return 0;
}

bool SetCiphers(SSL *sslContext, const char *ciphers)
{
   if (SSL_CTX_set_cipher_list(sslContext, ciphers) != 1)
   {
      std::cerr << L"[SSL_CTX_set_cipher_list] failed; could not find a suitable cipher in the provided list of ciphers \"" 
         << ciphers << "\"." << endl;
      return false;
   }
   return true;
}
#包括
#包括
//冒号分隔列表中允许的密码列表。示例仅将密码限制为AES-256
const char*allowedCiphers=“AES256-SHA256:AES256-GCM-SHA38:DHE-RSA-AES256-SHA256”;
布尔集合密码(SSL*sslContext,常量字符*密码);
int main()
{
//在此处创建ssl上下文等。
SSL*SSL=。。。;
//设置允许的密码
if(!SetCiphers(ssl,allowedCiphers))
出口(-1);
//过程。。。
返回0;
}
布尔集合密码(SSL*sslContext,常量字符*密码)
{
如果(SSL\U CTX\U set\U密码\U列表(sslContext,密码)!=1)
{
标准:cerr