简介certstrap https://github.com/square/certstrap 是一个自签名证书生成工具,相比 openssl 来说更简易好用。 安装安装要求:Go 1.18+git clone https://github.com/square/certstrapcd certstrapgo buildmv certstrap /usr/local /bin/certstrap -V用法1. 生成 CA 根证书# 会在当前目录下创建一个新的out目录,生成的证书都在该目录下certstrap init --common-name "ExampleCA" --expires "20 years 这个时候就需要客户端也提供证书# 创建CSRcertstrap request-cert -cn client# 签名certstrap sign client --CA ExampleCA4.