1. openssl req 命令
openssl req -utf8 -new -config client/req.cnf -key client/client-key.pem -sha1 -out client/client-req.csr
修改方法: 添加参数 -utf8
2. openssl x509 命令
openssl x509 -req -in client/client-req.csr -out client/client-cert.pem -extfile client/x509.cnf -sha1 -CA ca/ca-cert.pem -CAkey ca/ca-key.pem -CAcreateserial -days 365
修改方法: 修改源码文件 asn1_gen.c
static ASN1_TYPE *generate_v3(const char *str, X509V3_CTX *cnf, int depth,int *perr);
118行: asn1_tags.format = ASN1_GEN_FORMAT_ASCII; 改为 asn1_tags.format = ASN1_GEN_FORMAT_UTF8
另外: client/req.cnf 和 client/x509.cnf 这2个配置文件保存为 utf8 编码