1. 生成密钥文件 gmssl ecparam -genkey -name sm2p256v1 -text -out SM2.pem 2.生成证书签名请求 gmssl req -new -key SM2.pem -out SM2req.pem 3.用root ca签出证书 gmssl x509 -req -days 365 -extfile myconfig.cnf -extensions v3_usage -in SM2req.pem -CA rootcert.crt -CAkey rootkey....
1. 生成密钥文件 gmssl ecparam -genkey -name sm2p256v1 -text -out SM2.pem 2.生成证书签名请求 gmssl req -new -key SM2.pem -out SM2req.pem 3.用root ca签出证书 gmssl x509 -req -days 365 -extfile myconfig.cnf -extensions v3_usage -in SM2req.pem -CA rootcert.crt -CAkey rootkey....
//X509_check_ca() MUST be called! X509_check_ca(m_pX509); lKeyUsage = m_pX509->ex_kusage; if ((lKeyUsage & KU_DATA_ENCIPHERMENT) == KU_DATA_ENCIPHERMENT) { *lpUsage = CERT_USAGE_EXCH; //加密证书 } else if ((lKeyUsage & KU_DIGITAL_SIGNATURE) == KU_DIGITAL_SIGNATURE) { ...
Int_X509_verify_cert (X509_STORE_CTX * ctx); 代码demo: 在之前的文章“通过OpenSSL解码X509证书文件”里,讲述了如何使用OpenSSL将证书文件解码,得到证书上下文结构体X509的方法。下面我们接着讲述如何通过证书上下文结构体X509,获得想要的证书项。本文先讲述如何获取证书的基本项,后面还有文章介绍如何获取证书的扩展项...
$echo|openssl s_client-connectredhat.com:4432>/dev/null|openssl x509-noout-extsubjectAltName X509v3 Subject Alternative Name: DNS:*.redhat.com, DNS:redhat.com Another common set of extensions include the basic constraints andkey usageof a certificate. Specifically, you might want to check if a...
Cofactor: 1 (0x1) X509v3 extensions: X509v3 Subject Key Identifier: 90:A4:1B:...
issuer;X509_VAL validity;X509_NAME*subject;X509_PUBKEY*key;ASN1_BIT_STRING*issuerUID;/* [ 1 ] optional in v2 */ASN1_BIT_STRING*subjectUID;/* [ 2 ] optional in v2 */STACK_OF(X509_EXTENSION)*extensions;/* [ 3 ] optional in v3 */ASN1_ENCODING enc;};typedefstructx509_cinf_stX509...
X509v3 Basic Constraints: CA:FALSE X509v3 Key Usage: Digital Signature, Key Encipherment, Key Agreement X509v3 Extended Key Usage: TLS Web Server Authentication X509v3 Subject Alternative Name: DNS:erp.lab.qosit.local Signature Algorithm: sha1WithRSAEncryption 85:10:81:a3:74:15:2e:9b:2c:76...
4X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 无法解开证书里的签名。 5X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE(unused) 无法解开CRLs的签名。 6X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 无法得到证书里的公共密钥信息。 7X509_V_ERR_CERT_SIGNATURE_FAILURE ...
x509_extensions = v3_ca [ req_distinguished_name ] countryName = AB stateOrProvinceName = CD localityName = EF_GH organizationName = myorg organizationalUnitName = myorgunit commonName = mycn emailAddress = myemail@example.com [ v3_ca ] ...