如何从API Manager的wso2carbon.jks导出公钥(.pem)?

时间:2016-12-29 07:17:06

标签: wso2 wso2esb wso2-am wso2carbon api-manager

如何从API Manager的.pem导出公钥(wso2carbon.jks)?我想把它放在我的linux服务器的/etc/ssl/certs/ca-certificates.crt中。我这样做,上面是解决问题like me

2 个答案:

答案 0 :(得分:3)

<APIM_HOME>/repository/resources/security/运行此命令。这将创建一个证书文件wso2.crt

keytool -export -alias wso2carbon -file wso2.crt -keystore wso2carbon.jks

默认密钥库的密码为wso2carbon

答案 1 :(得分:2)

您可以使用openssl提取服务器的公钥。

  1. 启动服务器

  2. 执行命令&#34; openssl s_client -connect:&#34; 例如openssl s_client -connect localhost:8243

  3. 从结果中复制证书(BEGIN CERTIFICATE到END CERTIFICATE)

  4. -----开始证书----- MIICNTCCAZ6gAwIBAgIES343gjANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJV UzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxDTALBgNVBAoM BFdTTzIxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xMDAyMTkwNzAyMjZaFw0zNTAy MTMwNzAyMjZaMFUxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTEWMBQGA1UEBwwN TW91bnRhaW4gVmlldzENMAsGA1UECgwEV1NPMjESMBAGA1UEAwwJbG9jYWxob3N0 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCUp / oV1vWc8 / TkQSiAvTousMzO M4asB2iltr2QKozni5aVFu818MpOLZIr8LMnTzWllJvvaA5RAAdpbECb + 48FjbBe 0hseUdN5HpwvnH / DW8ZccGvk53I6Orq7hLCv1ZHtuOCokghz / ATrhyPq + QktMfXn RS4HrKGJTzxaCcU7OQIDAQABoxIwEDAOBgNVHQ8BAf8EBAMCBPAwDQYJKoZIhvcN AQEFBQADgYEAW5wPR7cr1LAdq + IrR44iQlRG5ITCZXY9hI0PygLP2rHANh + PYfTm xbuOnykNGyhM6FjFLbW2uZHQTY1jMrPprjOrmyK5sjJRO4d1DeGHT / YnIjs9JogR Kv4XHECwLtIVdAbIdWHEtVZJyMSktcyysFcvuhPQK8Qc / E / Wq8uHSCo = -----结束证书-----

    1. 打开/etc/ssl/certs/ca-certificates.crt并附加在步骤3中检索到的证书内容