ssl - Error self signed certificate getting chain

空扰寡人 提交于 2019-12-06 02:49:34

问题


I'm learning to use Gatling to test scenario

I've been doing with guide from documentation here http://gatling.io/docs/2.1.7/http/recorder.html

Because my to-be-tested scenario includes logging in with Google Account, it is rejected due to lack of certificate. I followed guidelines to generate a certificate

openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -days 1 -out rootCA.pem
openssl x509 -outform der -in rootCA.pem -out gatlingCA.crt
openssl genrsa -out device.key 2048
openssl req -new -key device.key -out device.csr
openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 1
openssl pkcs12 -export -in device.crt -inkey device.key -out server.p12 -name gatling -CAfile rootCA.pem -caname gatling -chain
keytool -importkeystore -deststorepass gatling -destkeypass gatling -destkeystore gatling-custom.jks  -srckeystore server.p12 -srcstoretype PKCS12 -srcstorepass gatling -alias gatling

But after this command

openssl pkcs12 -export -in device.crt -inkey device.key -out server.p12 -name gatling -CAfile rootCA.pem -caname gatling -chain

The terminal alerts an error: Error self signed certificate getting chain

What's next to do if I want to continue to create my scenario with user session, then use it to test?


回答1:


The "Error self signed certificate getting chain." error can be caused by entering identical Distinguished Name data for both of the certificates. Enter different information and this should no longer error.



来源:https://stackoverflow.com/questions/36545399/ssl-error-self-signed-certificate-getting-chain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!