问题标签 [x509certificate]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
710 浏览

ssl - Clojure 和 SSL/x.509 证书问题

我需要编写一个简单的工作程序来执行以下操作:

  1. 读取配置文件
  2. 连接到一堆服务器
  3. 建立一个 ssl 套接字
  4. 暂时从服务器的 x509 证书、过期日期和主机名中提取信息
  5. 完成后通过电子邮件发送报告

第 3 项和第 4 项是我在研究/谷歌搜索时运气不好的东西,我对 java 不太了解,从 2001 年左右的 1.2 开始

0 投票
3 回答
7283 浏览

ruby - Ruby 生成自签名证书

我正在尝试在 ruby​​ 中生成自签名证书,但遇到了麻烦。这是我目前拥有的:

当我尝试在 apache 中使用生成的私钥和证书时,出现此错误:

这是我的证书上写的:

它称自己为证书而不是 CSR,这是我在网上找到的大多数关于 apache2 错误的内容(我可能将 CSR 和 CERT 混淆了)。我的猜测是我没有生成正确类型的证书。也许我必须更改序列或版本属性。另外,我没有在任何地方进行任何自签名,无论如何我都不知道。我知道你可以做这样的事情:

提醒:我的目标是生成一个自签名证书,以防我的长期问题失去焦点。

编辑:我想真正的问题是如何用密钥签署证书

0 投票
3 回答
10947 浏览

java - 没有主机名的 SSL 证书

我已经使用 keytool 实现了一个带有服务器和客户端身份验证的 Web 服务。问题是如果我没有在其中包含主机名,则此身份验证不起作用。例如:

但我不需要,也不喜欢通过主机或 IP 进行验证。有什么办法可以避免吗?

谢谢。

0 投票
3 回答
8557 浏览

.net-3.5 - 在 HttpWebRequest 中发送客户端证书

我正在尝试使用下面的代码将客户端证书传递给服务器,但是我仍然恢复 HTTP 错误 403.7 - 禁止:需要 SSL 客户端证书。HttpWebRequest 不发送客户端证书的可能原因是什么?

0 投票
3 回答
1822 浏览

wcf - Developer certificate vs purchased certificate for WCF

I understsand that if I want to use authentication in WCF then I need to install a certificate on my server which WCF will use to encrypt data passing between my server and client.

For development purposes I believe I can use the makecert.exe util. to make a development certificate.

What is the worst that can happen if I use this certificate on the production environment?

and...

Why cant I use this certificate on the production environment?

and ...

What is the certificate actually going to do in this scenario?

[Edit: Added another question]

finally...

In a scenario where the website has a certificate installed to provide HTTPS support can the same certificate be used for the WCF services as well?

Note on my application: Its a NetTCP client and server service. The users will log in using the same username and password which they use for the website which is passed in clear text. I would be happy to pass the u/n + p/w in cleartext to WCF but this isnt allowed by the framework and a certificate must be in place. However, I dont want to buy an certificate due to budget constraints!

(Sorry for the possibly stupid question but I really dont understand this so would welcome some help with this).

0 投票
2 回答
3982 浏览

wcf - 从另一个 WCF 服务调用 WCF 服务

我有一个 WCF 服务托管在我的 Server1 上的 Windows 服务上。这台机器上也有 IIS。我从网络应用程序调用该服务,它工作正常。但在此服务中,我必须调用位于 Server2 上的另一个 WCF 服务(也托管在 Windows 服务上)。安全凭证设置为“消息”和“用户名”。我有一个类似“SOAP 协议协商失败”的错误。这是我的服务器证书公钥似乎无法识别的问题。但是,如果我在控制台应用程序中从 Server1 调用 Server2 上的服务,它工作正常。

我按照本教程设置我的证书: http: //www.codeproject.com/KB/WCF/wcf_certificates.aspx

这是我在 Server1 上的服务中尝试调用第二个的配置文件:

这是调用 Server1 服务的 Web 应用程序的配置文件:

如果我在控制台应用程序中而不是从我的服务中调用它,知道为什么它会起作用吗?也许它与 certificateValidationMode="ChainTrust" 有关?

0 投票
2 回答
3890 浏览

python - 如何使用 m2crypto 在非 SSL 设置中验证 X509 证书链

我试图弄清楚如何使用 m2crypto 验证从 X509 证书的公钥版本返回到一组已知根 CA 的信任链,当链可能任意长时。SSL.Context 模块看起来很有希望,只是我不是在 SSL 连接的上下文中执行此操作,而且我看不到传递给 load_verify_locations 的信息是如何使用的。

本质上,我正在寻找相当于: openssl verify pub_key_x509_cert 的接口

m2crypto 中有类似的东西吗?

谢谢。

0 投票
1 回答
1434 浏览

java - 如何验证证书的根信任

我是java安全新手。我有一个使用自签名根证书签名的证书。假设 client.pem 是签名证书,root.pem 是根证书。

签名证书嵌入到客户端程序中。

当连接到服务器程序时。

需要验证呼叫来自认证客户端。客户端应将其证书发送到服务器。

我需要检查 cleint.pem 是否实际上是使用 Java API 用 root.pem 签名的。

我对验证两个相同证书的 java.security.cert.Certificate.verify(PublicKey key) 方法有一些想法。但这对验证信任根有用吗?

有人可以帮忙吗?

谢谢阿比

0 投票
1 回答
911 浏览

java-me - 使用 Java ME 和 Bouncy Castle 验证 X.509 证书

谁能指出我在 Java ME 下使用 Bouncy Castle 验证 X.509 证书的示例?我可以看到如何使用 java.security.cert.Certificate.verify() 在 Java SE 代码中轻松执行此操作,但我在轻量级 BC API 中找不到等效方法。

提前致谢!

干杯迪诺

0 投票
3 回答
1306 浏览

java - 将 Java 翻译成 Python——使用 PEM 证书文件对字符串进行签名

我正在尝试将以下 Java 翻译成它的 Python 等价物。

这适用于 AWS FPS 使用的 PKI 签名验证。http://docs.amazonwebservices.com/AmazonFPS/latest/FPSAccountManagementGuide/VerifyingSignature.html

谢谢你的帮助!