Last active
May 7, 2019 14:50
-
-
Save tarsislima/85a7158526c34d0de9be9d3cd599d37e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## O arquivo original é um .pfx (não tinha toda a cadeia) | |
## Gerei arquivo chain.pem com o os outros certificados que me mandaram e verifiquei desta forma | |
cat cert.pem aa-Soluti.cer soluti_Multipla.cer Raiz-da-ICP-Brasil-v2.cer > chain.pem | |
openssl verify -CAfile chain.pem -untrusted soluti_Multipla.cer aa-Soluti.cer cert.pem | |
## SAIDA: | |
aa-Soluti.cer: OK | |
cert.pem: OK | |
## para gerar o p12 | |
openssl pkcs12 -export -out chain.p12 -inkey private.key -in chain.pem | |
## validando | |
openssl verify chain.p12 | |
### Saida: | |
unable to load certificate | |
140603493736896:error:0906D06C:PEM routines:PEM_read_bio:no start line:../crypto/pem/pem_lib.c:691:Expecting: TRUSTED CERTIFICATE | |
## verificando o chaim.pem | |
openssl verify chain.pem | |
## saida | |
C = BR, O = ICP-Brasil, OU = Autoridade Certificadora Raiz Brasileira v2, OU = AC SOLUTI, OU = AC SOLUTI Multipla, | |
OU = Certificado PF A1, CN = MARIO F N:55463572 | |
error 20 at 0 depth lookup: unable to get local issuer certificate | |
error chain.pem: verification failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment