Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssl - Error self signed certificate getting chain

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?

like image 601
necroface Avatar asked Apr 11 '16 09:04

necroface


1 Answers

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.

like image 58
Kez Floyd Avatar answered Oct 25 '22 11:10

Kez Floyd