使用该配置文件生成 Mirage 网关服务器的证书。

前提条件

过程

  1. C:\certs 中创建一个名为 server.conf 的配置文件。
  2. 将必需信息添加到配置文件中。
    将信息更改为斜体以匹配您的环境。
    [ ca ]
    default_ca = myca
    
    [ crl_ext ]
    authorityKeyIdentifier=keyid:always
    
    [ myca ]
    dir = ./
    new_certs_dir = $dir
    unique_subject = no
    certificate = $dir/root.cer
    database = $dir/certindex
    private_key = $dir/privkey.pem
    serial = $dir/certserial
    default_days = #ofdays
    default_md = sha512
    policy = myca_policy
    x509_extensions = myca_extensions
    crlnumber = $dir/crlnumber
    default_crl_days = #ofcrldays
    
    [ myca_policy ]
    commonName = supplied
    stateOrProvinceName = optional
    localityName = optional
    countryName = optional
    emailAddress = optional
    organizationName = optional
    organizationalUnitName = optional
    
    [ myca_extensions ]
    basicConstraints = CA:false
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid:always
    keyUsage = digitalSignature,keyEncipherment,dataEncipherment
    extendedKeyUsage = serverAuth
    # alt_names
    # subjectAltName  = @alt_names
    
    [alt_names]
    # if it contains dns type name, then it MUST be used and CN of subject MUST be ignored. Please refer to rfc2818 for details.
    # following items as example:
    #dns.1=*.miragedomain.com
    #dns.2=*.example.com
    中定义的备用主题名称 #ofdays 是证书的有效天数。 #ofcrldays 是下一 CRL 前的天数。

结果

将创建 Mirage 网关服务器的 OpenSSL 配置文件。

后续步骤

生成证书请求。