我正在关注这个例子但是在$ client-> authenticate上得到一个错误($ _ GET ['Code']); 正在返回代码值,但不会进行身份验证.错误是
致命错误:未捕获的异常'RuntimeException',消息'在任何公共系统位置都找不到系统CA包.早于5.6的PHP版本未正确配置为默认使用系统的CA捆绑包.为了验证对等证书,您需要将磁盘上的路径提供给"验证"请求选项的证书包:http://docs.guzzlephp.org/en/latest/clients.html#verify.如果您不需要特定的证书包,那么Mozilla提供了一个常用的CA包,可以在这里下载(由cURL的维护者提供):https://raw.githubusercontent.com/bagder/ca-bundle/master/ ca-bundle.crt.在磁盘上有可用的CA捆绑包之后,可以将'openssl.cafile'PHP ini设置设置为指向文件的路径,从而省略'verify'请求选项.有关详细信息,请参阅http://curl.haxx.se/docs/sslcerts.html.在/base/data/home/apps/s~solomon-1/1.388711045841969234/google-api-php-client/vendor/guzzlehttp/ringphp/src/Client/Cli in/base/data/home/apps/s~solomon第51行的-1/1.388711045841969234/google-api-php-client/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
??
生成的 CSR 是否包含 subjectAltName我已将 openssl.cnf 文件配置为支持扩展,当我转储 CSR 时,我可以看到主题可用,而不是 subjectAltName
这就是CSR的产生方式
openssl req -new -sha256 -key ./private.key -out ./cert.csr -config ./openssl.cnf
Run Code Online (Sandbox Code Playgroud)
并查看我使用的 CSR 信息
openssl req -noout -text -in cert.csr
Run Code Online (Sandbox Code Playgroud)
输出是
bash:/home/ubuntu# openssl req -noout -text -in cert.csr
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=sd, ST=sd, O=Internet Widgits Pty Ltd
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (3072 bit)
Modulus:
00:ae:6f:5d:75:f6:7a:af:2f:af:2b:39:dc:f7:b6:
d0:61:3d:49:f7:50:a2:a6:d1:99:d8:ce:a6:24:87:
1f:4e:ad:02:58:c9:34:12:78:22:f3:99:29:69:c6:
66:78:06:4e:bc:f6:e1:f6:f6:bb:f6:52:97:a4:14:
d7:9d:51:03:07:20:5d:10:88:35:db:32:7a:14:9c:
ea:e3:55:02:7a:20:bc:3c:24:c5:db:e8:82:12:c5:
16:78:cb:fa:0f:79:02:30:f3:23:c1:6b:55:e1:c7:
06:78:30:ac:4c:63:6e:74:5d:28:58:69:20:92:90:
a2:3c:d3:ad:20:c5:64:e3:22:4c:8a:e0:ad:04:60:
2d:c0:3f:d9:05:84:9b:53:1f:17:ac:9e:49:48:68:
08:c6:1d:c5:fe:df:28:64:b1:6d:15:f1:90:c0:4f:
fe:52:c1:8e:2f:d6:20:81:84:db:ed:43:6b:a7:8c:
37:58:a1:7a:fb:a9:4a:80:be:f0:27:d4:4b:13:ac:
56:74:6e:5d:0d:a0:09:8d:96:89:92:8f:b0:af:07:
d8:92:6b:ea:09:15:f6:0c:68:24:30:33:7f:a3:d9:
e6:45:1b:95:aa:79:63:29:60:b2:2b:19:ed:ee:aa: …
Run Code Online (Sandbox Code Playgroud) 我有一个关于 GPG 证书和证书颁发机构的小问题。
我正在使用 GnuPG 对我在服务器上托管的 tarball 进行签名。我希望想要下载此 tarball 的用户能够使用我的公钥对其进行加密。目前,我将我的公钥存储在我拥有的另一台服务器上。这有两个问题:
我过去读过一些有关密码学解决方案的内容,并且知道一点 X.509 CA 的工作原理,但我不太了解 PGP 密钥的工作原理。我尝试在 GPG 中使用我的 SSL(受信任)证书,但总是失败(也许有一个选项我还没有找到?)。如果无法使用我的 SSL 证书,如何将我的 PGP 证书“注册”到 CA?
谢谢!
最好的,
蒂博。
我想将 CA 证书包含在资源文件 (Resources.resx) 中,并且一旦作为字节流读取,就会提供给 X509Certificate 构造函数类。CA 证书采用 .der 格式。我已将 .der 文件添加到项目的 Resources 文件夹中。如何在另一个类中访问它并将其传递给 X509Certificate 构造函数?
我遵循此链接底部给出的 C# 代码 [ http://www.embedded101.com/Blogs/PaoloPatierno/entryid/366/mqtt-over-ssl-tls-with-the-m2mqtt-library-and-蚊子经纪人]
更新:这是我在客户端所做的方式。
client = new MqttClient(ddlServerIP.Text, MqttSettings.MQTT_BROKER_DEFAULT_SSL_PORT, true, new X509Certificate(Properties.Resources.ca)
, new X509Certificate(Properties.Resources.client2), MqttSslProtocols.TLSv1_2);
String clientId= Guid.NewGuid().ToString();
byte code = client.Connect(clientId);
Run Code Online (Sandbox Code Playgroud)
然而在服务器端我收到一个错误:
OpenSSL 错误:错误:140890C7:SSL 例程:SSL3_GET_CLIENT_CERTIFICATE:对等方未返回证书
我有一个 ClusterIssuer 正在等待secretName
,我在 中看到ClusterIssuer
spec
,我可以指定secretName
:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: postgres-operator-ca-certificate-cluster-issuer
spec:
ca:
secretName: postgres-operator-ca-certificate # <---- Here
Run Code Online (Sandbox Code Playgroud)
但如何提供对秘密命名空间的引用呢?这个秘密是使用以下命令创建的Certificate
:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: postgres-operator-self-signed-ca-certificate
namespace: postgres # <---- This namespace can not be changed to cert-manager
spec:
isCA: true
commonName: postgres-operator-ca-certificate
secretName: postgres-operator-ca-certificate
issuerRef:
name: postgres-operator-selfsigned-clusterissuer
kind: ClusterIssuer
Run Code Online (Sandbox Code Playgroud)
因为这是namespaced
建议使用Issuer
而不是ClusterIssuer
? 默认情况下是否ClusterIssuer
在命名空间中查找cert-manager
?
我已经从我的服务器生成了 .p12 文件。但是现在我们正在开发 IOS 应用程序,需要 CA 来实现它。
我们正在使用 Amazon EC 负载均衡器服务器,所以我不知道在哪里可以获得 CA,.p12 是否也可以生成 CA?