简体   繁体   English

TLS / SSL证书验证

[英]TLS/SSL certificate verification

I am new to TLS/SSL so this might be a very basic question, but I've been searching a lot an could not find an answer. 我是TLS / SSL的新手,所以这可能是一个非常基本的问题,但是我一直在搜索很多内容,但找不到答案。

I am trying to implement a TLS/SSL client. 我正在尝试实现TLS / SSL客户端。 This client will run on an embedded unit with Windows OS on it (XPe or WES7). 该客户端将在带有Windows操作系统(XPe或WES7)的嵌入式单元上运行。 My implementation uses GnuTLS. 我的实现使用GnuTLS。

How do I get the list of trusted authorities to my unit so my client can verify the server's certificate? 如何获得我单位的受信任权限列表,以便我的客户端可以验证服务器的证书? Is it supposed to be a file stored on the client side, that the client is responsible for keeping up to date? 是否应该将文件保存在客户端,由客户端负责保持最新状态? Or can my client somehow get this list from the internet each time it is needed and not maintain it locally? 还是我的客户每次都能以某种方式从互联网上获取此列表,而不是在本地进行维护?

The Certificating Authority (CA) master certificates are stored client side and the client is responsible for keeping them up to date. 证书颁发机构(CA)主证书存储在客户端,客户端负责使它们保持最新。 Keeping them up to date isn't as hard as it sounds, as CA certificates aren't changed that often - most are valid for 5-10 years at least. 使它们保持最新状态并不像听起来那样困难,因为CA证书并不经常更改-大多数证书的有效期至少为5-10年。

Client side storage is necessary because any given internet site your application uses might be compromised. 客户端存储是必需的,因为您的应用程序使用的任何给定的Internet站点都可能受到威胁。

To get a list, you might start by looking at the CA certificates distributed with a browser or at the cacerts file distributed with Java. 要获取列表,您可能首先查看通过浏览器分发的CA证书或通过Java分发的cacerts文件。 Before releasing your code, you'll probably want to check that the certs you use are genuine by checking them against information provided by the CA. 在发布代码之前,您可能需要根据CA提供的信息来检查所使用的证书是否真实。

Go to any Windows machine and run "certman.msc" from command-line. 转到任何Windows计算机,然后从命令行运行“ certman.msc”。 Export each CA certificate (Intermediate Certificates, Trusted Authorities) to file (BER, PEM), then import these certificates into your embedded software. 将每个CA证书(中间证书,可信机构)导出到文件(BER,PEM),然后将这些证书导入到嵌入式软件中。 Now you can validate email certificates, the same way Windows does (ie using various x.509 related RFCs and CRLs) 现在,您可以像Windows一样验证电子邮件证书(即,使用各种x.509相关的RFC和CRL)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM