这几天项目中需要使用到BASE64格式的证书信息,我就从IE中导出证书,里面有可选项,你可以选择不需要导出证书私钥,然后选择导出BASE64编码格式X.509的证书,即.CER格式的证书,导出到本地之后,使用UE之类的工具打开之后就可以看见里面的信息,
类似这种
—–BEGIN CERTIFICATE—–
MIICsDCCAhmgAwIBAgIMFIQFnae2+U9IIPuaMA0GCSqGSIb3DQEBBQUAMCUxCzAJ
BgNVBAYTAkNOMRYwFAYDVQQDDA1zdWJjYV9yZXF1ZXN0MB4XDTA5MDYwMzA1Mjc1
MVoXDTEyMDYwMjA1Mjc1MVowZzELMAkGA1UEBgwCQ04xDjAMBgNVBAoMBUNDQkNB
MSwwKgYJKoZIhvcNAQkBFh0zMjMzMzMzMzU1NTU1NTU1NTU1MkBUZXN0LmNvbTEa
MBgGA1UEAwwRMzMzMzMzNTU1NTU1NTU1NTUwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
MIGJAoGBALe2c6Xnczi5X3c82diz0X3MrGUh1AZS1BKQjjZXZrrEEWCtJIq9/XIW
BGCKaUZOCeV7zXcCbSouICbnVu1s1CUz7clGmvljR2B1FNjVAVHQR5hVfq35uchy
k7O/n/Kcp+owArLMn19f25PAGV0YwBRlCwwi4ou5FAH8Ksh/vZJZAgMBAAGjgaIw
gZ8wDwYDVR0TAQEABAUwAwEBADAgBgNVHSUBAQAEFjAUBggrBgEFBQcDAgYIKwYB
BQUHAwQwDgYDVR0PAQEABAQDAgDAMBQGCWCGSAGG+EIBAQEBAAQEAwIAgDAiBgNV
HSMBAQAEGDAWgBRRU03IrzHxxZseQw6rDn09jk4dDTAgBgNVHQ4BAQAEFgQUrflQ
vpbZNm7dCj6lVIGWWtjrKqgwDQYJKoZIhvcNAQEFBQADgYEATsO4BprAfPWpO35d
Ar2bXeTS4YwCC7UFRefWGl8v0wQf71n4qP/ma+JJl7TJ0VbPEjq9/zbhWB2+ZAbE
om531y9bBaId/3/8XY/J11t5+cPg4U79js7bK1DvlxMbUhh9nQD9VZeL8fKLXbU3
SviMO2Xe4Jw0TkOh2s7R2T2jHqQ=
—–END CERTIFICATE—–
这个就是证书的base64编码
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/6928.html