将 SGD Gateway 密钥和 SGD Gateway 证书导入 SGD Gateway 密钥库。
gateway key import --keyfilekey-file
[ --keyalg RSA|DSA ] { --certfilecert-file
| --certfilecert-file..
[ --cacertfileca-cert-file
] } [ --alwaysoverwrite ]
将私钥和相应的公钥证书导入位于 /opt/SUNWsgdg/proxy/etc/keystore
的 SGD Gateway 密钥库。
如果该密钥库已有 SGD Gateway 密钥条目,则它将被覆盖。默认情况下,将显示确认提示。
为访问 SGD Gateway 密钥库,此命令使用 /opt/SUNWsgdg/etc/password
中的密码。如果未提供此文件,则该命令会提示输入密码。
下表显示了此命令的可用选项。
选项 | 描述 |
---|---|
| 包含私钥的文件。该密钥必须是 PEM 格式。 |
| 私钥使用的编码算法。选项为 RSA 和 DSA。默认情况下,选择 RSA。 |
| SSL 证书文件。 |
| CA 或根证书文件。 |
| 在覆盖密钥库中的条目之前不进行提示。 |
要导入证书链,请使用 --cacertfile
选项来指定中间 CA 证书。链中的所有证书都必须是 PEM 格式。
如果证书链使用多个 CA 证书,将链中的所有 CA 证书整合到一个文件中。用于对服务器证书进行签名的 CA 证书必须首先出现,例如:
-----BEGIN CERTIFICATE----- ...Intermediate CA's certificate
... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- ...CA root certificate
... -----END CERTIFICATE-----
以下示例将 RSA 编码的私钥 gateway1.key
和相应的公钥证书 gateway1.pem
导入 SGD Gateway 密钥库。
# /opt/SUNWsgdg/bin/gateway key import \ --keyfile gateway1.key \ --certfile gateway1.pem
以下示例将私钥和证书链导入 SGD Gateway 密钥库。中间 CA 证书为 gateway1-ca.pem
。
# /opt/SUNWsgdg/bin/gateway key import \ --keyfile gateway1.key \ --certfile gateway1.pem \ --cacertfile gateway1-ca.pem