Where does Grails store a self-generated SSL certificate?

I run grails in my local dev block (Mac OS 10.8) to host the web service over SSL using a self-signed certificate and the WealSSL grails plugin. The problem is that I am connecting to this server using the iPhone Xcode simulator and this gives me an untrusted certificate error.

I found instructions for installing the certificate on the phone / simulator, but my question is: how to find this certificate on my machine for installation?

+4
source share
2 answers

I think that if you use grails 2.2.x, you will not see the directory in ~.grails/ . To find the keystore, the plugin uses Pattern , corresponding to Grails version 1.3.x and 2.0.x - 2.1.x

Ideally, you should see certificates stored in ~./grails/${grailsVersion}

Check out the plugin code for certificates .

Created a JIRA defect for it.

The matrix template will not work for Grails version 2.2.x and higher due to the code below.

 import java.util.regex.Pattern Pattern V2X = Pattern.compile("2.[01].\\d+?") assert !V2X.matcher("2.2.0").find() 
+2
source

Also, consider using openssl to get the key directly from the grails server with a command like this:

 openssl s_client -connect localhost:8443 

AFTER running a rake with something like this:

 grails run-app -https 

The result of the openssl command will have a self-signed certificate that you can add to your client’s trusted certificates.

0
source

Source: https://habr.com/ru/post/1481450/


All Articles