是否有人知道您可以在OpenSSL配置文件中指定的所有字段都在Cloudflare的CFSSL证书颁发机构工具包中?某些字段(例如default_md或指定国家必须匹配)似乎缺少CFSSL在其JSON文件中识别的选项(以下是摘录):
type CAConstraint struct {
IsCA bool `json:"is_ca"`
MaxPathLen int `json:"max_path_len"`
MaxPathLenZero bool `json:"max_path_len_zero"`
}
// A SigningProfile stores information that the CA needs to store
// signature policy.
type SigningProfile struct {
Usage []string `json:"usages"`
IssuerURL []string `json:"issuer_urls"`
OCSP string `json:"ocsp_url"`
CRL string `json:"crl_url"`
CAConstraint CAConstraint `json:"ca_constraint"`
OCSPNoCheck bool `json:"ocsp_no_check"`
ExpiryString string `json:"expiry"`
BackdateString string `json:"backdate"`
AuthKeyName string `json:"auth_key"`
RemoteName string `json:"remote"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
NameWhitelistString string `json:"name_whitelist"`
AuthRemote AuthRemote `json:"auth_remote"`
CTLogServers []string `json:"ct_log_servers"`
AllowedExtensions []OID `json:"allowed_extensions"`
CertStore string `json:"cert_store"`
Policies []CertificatePolicy
Expiry time.Duration
Backdate time.Duration
Provider auth.Provider
RemoteProvider auth.Provider
RemoteServer string
RemoteCAs *x509.CertPool
ClientCert *tls.Certificate
CSRWhitelist *CSRWhitelist
NameWhitelist *regexp.Regexp
ExtensionWhitelist map[string]bool
ClientProvidesSerialNumbers bool
}CFSSL是抽象了许多OpenSSL配置选项,还是我只是不知道您可以在哪里指定它们呢?
发布于 2018-07-13 18:59:55
消息摘要算法似乎是动态选择的,并且取决于CA私钥的长度。
func DefaultSigAlgo(priv crypto.Signer) x509.SignatureAlgorithm {
pub := priv.Public()
switch pub := pub.(type) {
case *rsa.PublicKey:
keySize := pub.N.BitLen()
switch {
case keySize >= 4096:
return x509.SHA512WithRSA
case keySize >= 3072:
return x509.SHA384WithRSA
case keySize >= 2048:
return x509.SHA256WithRSA
default:
return x509.SHA1WithRSA
} ...基于我在Github上的CFSSL源中的发现。
关于县,我无法在限制或配置它的代码中找到任何限制,可以假定所有国家都是被允许的。
发布于 2020-05-07 11:04:56
如果您想要不同的签名算法和消息摘要,那么这在CFSSL中是不可能的。但是,如果这是交易的破坏者,您可以通过使用openssl生成CSR并使用CFSSL进行签名来实现这一点。
cfssl sign -ca ca/ca.pem -ca-key ca/ca-key.pem \
-config config/signing-profiles.json \
-profile client-server server.csr | cfssljson -bare ca/serverhttps://stackoverflow.com/questions/51140842
复制相似问题