Cloudflare pki公钥基础设施

该工具组共有8个工具

1、cfssl

常用的可用指令:  
sign signs a certificate bundle build a certificate bundle genkey generate a private key and a certificate request gencert generate a private key and a certificate serve start the API server version prints out the current version selfsign generates a self-signed certificate print-defaults print default configurations

 使用cfssl   [command]   -help可以找到有关命令的更多信息。 version命令不带参数。

签署证书:

cfssl sign [-ca cert] [-ca-key key] [-hostname comma,separated,hostnames]  csr [subject]

csr         是客户端的证书请求。

-ca、-ca-key    分别是CA的证书和私钥。默认情况下,它们是ca.pem和ca_key.pem。

-hostname       是逗号分隔的主机名列表,它覆盖证书SAN扩展中的DNS名称和IP地址。

例如,假设CA的私钥位于/etc/ssl/private/cfssl_key.pem中且CA的证书位于/etc/ssl/certs/cfssl.pem中,则为cloudflare.com签署cloudflare.pem证书:

cfssl sign -ca     /etc/ssl/certs/cfssl.pem       \
           -ca-key /etc/ssl/private/cfssl_key.pem \
           -hostname cloudflare.com               \
           ./cloudflare.pem

猜你喜欢

转载自www.cnblogs.com/liliyang/p/9783386.html