标签: openssl

在 Apache 的不同位置下可能有不同的 SSLCACertificateFiles(客户端 ssl 证书)

我正在设置 Apache 来进行智能卡身份验证。智能卡登录基于由操作系统驱动程序处理的客户端 SSL 证书。

我目前只有一个智能卡提供商,但将来可能会有几个。我不确定 Apache 2.2. 处理每个位置的客户端认证。我做了一些快速测试,不知何故似乎只有最后一个 SSLCACertificateFile 指令才会有效,这听起来不对。

如下所述,是否可以在 Apache(2.2、2.4)中的每个位置使用不同的 SSLCACertificateFile,或者 SSL 协议是否以某种方式限制了每个 IP 不能拥有多个 SSLCACertificateFile?

下面的示例潜在配置我希望如何在同一服务器上处理多个 SSLCACertificateFile 以允许用户使用不同的智能卡提供登录。

<VirtualHost 127.0.0.1:443>

    # Real men use mod_proxy
    DocumentRoot "/nowhere"

    ServerName local-apache
    ServerAdmin you@example.com

    SSLEngine on
    SSLOptions +StdEnvVars +ExportCertData

    # Server-side HTTPS configuration
    SSLCertificateFile /etc/apache2/certificate-test/server.crt
    SSLCertificateKeyFile /etc/apache2/certificate-test/server.key

    # Normal SSL site traffic does not require verify client
    SSLVerifyClient none
    SSLVerifyDepth 999

    # Provider 1
    <Location /@@smartcard-login>
        SSLVerifyClient require

        SSLCACertificateFile /etc/apache2/certificate-test/ca.crt

        # Apache does not natively pass forward headers
        # …
Run Code Online (Sandbox Code Playgroud)

ssl https openssl apache-2.2

5
推荐指数
2
解决办法
7203
查看次数

如何使用一个 SSL 证书保护根域和通配符子域?

我试图生成自签名证书,以确保这两个example.com*.example.com。看看这个这个问题的答案,似乎有同样数量的人同意和不同意这是否可以做到。但是,来自认证机构的网站似乎表明可以这样做。

目前,这些是添加到我的 openssl 配置文件中的更改:

[req]
req_extensions = v3_req

[req_distinguished_name]
commonName = example.com

[v3_req]
subjectAltName = @alt_names

[alt_names]
DNS.1 = example.com
DNS.2 = *.example.com
Run Code Online (Sandbox Code Playgroud)

我尝试了上述配置并生成了证书。导航到 时https://example.com,它会产生通常的警告,表明证书是“自签名”的。接受后,我导航到https://abc.example.com并产生一个额外的警告,说该证书仅对example.com.

证书详细信息仅example.com在证书层次结构中列出,不存在任何通配符子域的迹象。

我不确定这是由于配置错误还是通用名称应该有通配符或无法做到这一点。

进一步更新:

这是我通过使用 openssl 查看证书请求得到的结果:

# openssl req -text -noout -in eg.csr
Certificate Request:
 Data:
  Version: 0 (0x0)
  Subject: C=xx, L=Location, O=Example Pte Ltd, CN=example.com/emailAddress=admin@example.com
  Subject Public Key Info:
  Public Key Algorithm: rsaEncryption
  Public-Key: (1024 bit) …
Run Code Online (Sandbox Code Playgroud)

https openssl ssl-certificate

5
推荐指数
1
解决办法
4195
查看次数

无法验证第一个证书(RapidSSL/GeoTrust/Ubuntu)

一直试图让 Ubuntu 识别 GeoTrust SAN 证书,但没有运气。浏览器工作正常。帮助?

$ openssl s_client -showcerts -connect artsyapi.com:443
CONNECTED(00000003)
depth=0 businessCategory = Private Organization, 1.3.6.1.4.1.311.60.2.1.3 = US, 1.3.6.1.4.1.311.60.2.1.2 = Delaware, serialNumber = 4660944, C = US, ST = New York, L = New York, O = Artsy Inc., CN = artsy.net
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 businessCategory = Private Organization, 1.3.6.1.4.1.311.60.2.1.3 = US, 1.3.6.1.4.1.311.60.2.1.2 = Delaware, serialNumber = 4660944, C = US, ST = New York, L = New York, O …
Run Code Online (Sandbox Code Playgroud)

openssl ssl-certificate

5
推荐指数
1
解决办法
3万
查看次数

GeoTrust SSL CA 的“无法在本地验证发行人的权限”

我在从命令行连接到 SSL 站点(不是我的)时遇到问题。认证路径为“GeoTrust Global CA”>“GeoTrust SSL CA”>“*.131500.com.au”。该服务器最近更换了他们的证书(从 2013 年 5 月 13 日起生效),这将是它停止工作的时间。

我在使用 curl、wget 和“openssl s_client”、whynopaddlock.com 和三个不同的主机(两个不同的 Ubuntu 13.04 主机,包括一个新的 VM,一个 Windows-7-x64/cygwin)时看到了同样的问题。

我在使用浏览器时没有问题(Windows-7-x64 上的 Google Chrome 26.0.1410.64 m)。

有人在这里有任何指示吗?我通常会责怪我的 ssl 客户端配置,但这发生在多个主机上。接下来我会责怪网站的配置,但为什么它在 Chrome 中运行良好?

GeoTrust 是否可能发生了一些需要更改配置的更改?

www.whynopadlock.com 报道:

SSL verification issue (Possibly mis-matched URL or bad intermediate cert.). Details:
ERROR: cannot verify tdx.131500.com.au's certificate, issued by `/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA': Unable to locally verify the issuer's authority.
Run Code Online (Sandbox Code Playgroud)

openssl s_client 有以下说法:

$ openssl s_client -connect tdx.131500.com.au:443
CONNECTED(00000003)
depth=0 serialNumber = 8z3ZNMMt8GMi9Qumrn0xficRkxAYJZQq, …
Run Code Online (Sandbox Code Playgroud)

ssl openssl

5
推荐指数
1
解决办法
3万
查看次数

Squid SSL 透明代理 - SSL_connect:error in SSLv2/v3 read server hello A

我正在尝试为我的内部服务器之一设置 SSL 代理以https://www.googleapis.com使用 Squid进行访问,以使该服务器上的 Rails 应用程序能够googleapis.com通过代理访问。

我是新手,所以我的方法是使用 Squid 设置 SSL 透明代理。我Squid 3.3在 Ubuntu 12.04 上构建,生成一对 ssl 密钥和 crt,并像这样配置鱿鱼:

http_port 443 transparent cert=/home/larry/ssl/server.csr key=/home/larry/ssl/server.key
Run Code Online (Sandbox Code Playgroud)

并将几乎所有其他配置保留为默认值。持有key/crt的目录的授权是drwxrwxr-x 2 proxy proxy 4096 Oct 17 15:45 ssl

回到我的开发笔记本电脑上,我把<proxy-server-ip> www.googleapis.com/etc/hosts的电话放到我的代理服务器上。

但是当我在 Rails 应用程序中尝试它时,我得到了:

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
Run Code Online (Sandbox Code Playgroud)

而且我还尝试在 cli 中使用 openssl:

openssl s_client -state -nbio -connect www.googleapis.com:443 2>&1 | grep "^SSL"
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:error …
Run Code Online (Sandbox Code Playgroud)

ssl proxy squid transparent-proxy openssl

5
推荐指数
1
解决办法
2604
查看次数

openssl passwd 的目的是什么

我正在阅读“可靠地部署 Rails 应用程序

关于定义要由 Chef 设置的用户,它说:

“接下来我们需要定义用户,在data_bags/users里面复制deploy.json.example文件到deploy.json。

使用以下命令为您的部署用户生成密码:

openssl passwd -1 "plaintextpassword"

并相应地更新 deploy.json。”

我的问题是,目的是openssl passwd什么?仅仅是为了生成一个强密码吗?如果我输入随机字符会不会一样好?

然后,我的“实际”密码是什么?纯文本版本,还是加密版本?我是否需要将两者的副本保存到我的密码管理器中?

更新:

是的,我已经阅读了手册。是的,我知道它会生成我的密码的 md5 加密版本。我的问题更多是关于为什么要使用它,而不是使用您自己组成的非常安全的随机字符串(或使用密码生成器生成)。

我能想到的一个好处是您可以输入一个可记住的密码,并在openssl passwd -1 "plaintextpassword"每次需要输入时运行它。因此,就易于记忆的密码和安全的随机密码而言,您将拥有两全其美的优势。每次需要时通过``openssl passwd -1` 运行可记忆/纯文本版本,这样您就不必存储密码的加密版本,并在每次需要输入密码时键入/粘贴。

这是唯一的好处吗?如果不是,其他的又是什么?

password openssl password-management passwd chef-solo

5
推荐指数
2
解决办法
2万
查看次数

有没有办法手动检查 openssl CVE-2014-0160 漏洞?

有没有办法根据CVE - CVE-2014-0160(最好使用opensslCLI)检查一些内部服务?

不能测试一切都只是通过:测试你的心脏出血漏洞的服务器(CVE-2014-0160)

openssl heartbleed

5
推荐指数
1
解决办法
2万
查看次数

Ubuntu 14.04 上的 git(在 github 上)的 SSL 验证错误

我正在尝试克隆刚刚完全开源的 atom 存储库,但遇到了一些麻烦。

尝试访问git clone存储库会产生 SSL 错误:

wug@wugputer:/src/test$ git clone https://github.com/atom/atom.git
Cloning into atom...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/atom/atom.git/info/refs

fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)

谷歌搜索表明这是一个失败的 CURL 调用,我可以设置一个环境变量来获取更多信息,但它没有显示任何特别有用的信息:

wug@wugputer:/src/test$ GIT_CURL_VERBOSE=1 git clone https://github.com/atom/atom.git
Cloning into atom...
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.wugcorp.com port 3128 (#0)
*   Trying 10.1.2.3... * Connected to proxy.wugcorp.com …
Run Code Online (Sandbox Code Playgroud)

ssl openssl git ssl-certificate curl

5
推荐指数
1
解决办法
3873
查看次数

客户端打招呼后 Openssl 挂起

我有以下奇怪的 SSL 连接错误:

openssl s_client -ssl3 -connect host:443  -msg

CONNECTED(00000003)
>>> SSL 3.0 Handshake [length 0087], ClientHello
    01 00 00 83 03 00 53 70 cb 57 f8 66 46 4d ad 9f
    12 f9 03 32 11 b9 58 f8 82 d7 43 36 80 c9 39 68
    14 72 85 18 95 2b 00 00 5c c0 14 c0 0a 00 39 00
    38 00 88 00 87 c0 0f c0 05 00 35 00 84 c0 12 …
Run Code Online (Sandbox Code Playgroud)

centos openssl amazon-ec2 amazon-web-services

5
推荐指数
1
解决办法
3042
查看次数

在 debian 挤压中更新 openssl

openssl 中有这个CVE-2014-0224错误,所以我想更新我受影响的

# openssl version
OpenSSL 0.9.8o 01 Jun 2010
Run Code Online (Sandbox Code Playgroud)

但是没有关于挤压的更新。我读到它已经在挤压 LTS 中修复了。我应该怎么做?是否有解决挤压的方法,我只需要等待?

我应该手动安装 openssl 更新吗?如何?我尝试安装 openssl-0.9.8za 和 openssl-1.0.1h ,wget, ./config, make, make installopenssl version仍然相同。我也尝试过配置参数,但是这个构建失败了。

debian openssl

5
推荐指数
1
解决办法
1万
查看次数