Unable to import certificates, "Unknown format in import"

2,795 views
Skip to first unread message

rfom...@tempo.io

unread,
Mar 24, 2017, 7:02:06 AM3/24/17
to BrowserMob Proxy

Got certificates from:

https://github.com/lightbody/browsermob-proxy/tree/master/browsermob-core/src/main/resources/sslSupport


According to instruction, I should be able to import "cer" file to the browser and it will work with proxy.

"Install the ca-certificate-rsa.cer file in your browser or HTTP client to avoid untrusted certificate warnings. "

https://github.com/lightbody/browsermob-proxy#ssl-support


But then I am getting errors trying to actually add certificates. What I am doing wrong?


$ security import ca-certificate-rsa.cer -k ~/Library/Keychains/login.keychain

security: SecKeychainItemImport: Import/Export format unsupported.


$ security add-certificates ca-certificate-rsa.cer

security: SecCertificateCreateFromData: Unknown format in import.



$ security import ca-keystore-rsa.p12 -k ~/Library/Keychains/login.keychain

security: SecKeychainItemImport: Unknown format in import.


$ security import ca-keystore-rsa.p12 -P password

security: SecKeychainItemImport: Unknown format in import.


$ security add-certificates ca-keystore-rsa.p12

security: SecCertificateCreateFromData: Unknown format in import.



rfom...@tempo.io

unread,
Mar 24, 2017, 9:23:18 AM3/24/17
to BrowserMob Proxy
fixed

certificate was downloaded incorrectly
Reply all
Reply to author
Forward
0 new messages