Rest API将Perm作为“PEM编码的证书文件”返回。如何将其转换为文本文件,如下面这个文件:
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIRAOzcoUj/60jiktDEnrghGfcwDQYJKoZIhvcNAQELBQAw
QjEfMB0GA1UECgwWdGVzdC1qcGhhbS51bml0eWRldi5pbzEfMB0GA1UEAwwWdGVz
dC1qcGhhbS51bml0eWRldi5pbzAeFw0xODAxMTYyMjQ0MjJaFw0yODAxMTUyMjQ0
MjJaMEIxHzAdBgNVBAoMFnRlc3QtanBoYW0udW5pdHlkZXYuaW8xHzAdBgNVBAMM
FnRlc3QtanBoYW0udW5pdHlkZXYuaW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDl+WFbLhUWsjb5fAofYvI1zijEHaF52ldGahfByOjGVyJ8UaGi//CM
L7PPqbJmSceeMIdfAie5f0GVXH+NqbersH33u6oETnRG+WO9aKMTB+bbOIDSkS33
ufIhf6wSit/GhUjujnE3xuPopttS0WpcqUCFED5k2m2mumeJkmOTjngVexrKMfvQ
Va/ubYOUNpCQnTgtNxaE93qDoylB+CFmrZ3CBDbu/LnF6YNu5NYlFGoOqAeCFacr
l4ZkTwbXo3MPH/PZlqVdFQKQtwMdqioXeo0N41zaEFtU5S+YS5VArWEQwof8B/zF
5xrhIY/n2iyM5N5ln9DDJm2YwqR43BWVAgMBAAEwDQYJKoZIhvcNAQELBQADggEB
AMVqd9kDsg+VpjA01fgxlbQmRwzNbK736OEQpEh5iIAnEleoewSt2nY4U/eCJ5eE
XqsCEvRMxWldT0soUKQxrVkK2NmnyansRCm7kFmZ3l2IJjKR909wrBdQASKZOyeG
PvwAeAHHMX1CZnFC+71WvMfnr+Cg0kI4nYeeaTVQTsTIxEt91rsFg9+YVm99ci0J
J9NMGk6Zm+DAHN09E7I2tHBxk61E1mVd9S7627XAPSVIghcZORf7dgxoRWsux3pt
I5k/2PMrSxYRx4rPDz+J7jE7dKy5ClDj1WOmPp2D/fbojXb3YotYbEwsjBAtVfDO
HBtT4Ws0m+3FBjvhemIMLK0=
-----END CERTIFICATE-----
在AngularJS中,Javascript 感谢
答案 0 :(得分:0)
PEM编码证书已经是base64文本文件。阅读http://www.gtopia.org/blog/2010/02/der-vs-crt-vs-cer-vs-pem-certificates/
答案 1 :(得分:0)
猜猜是什么...您不需要转换文件!
就是这么简单!