Search code examples
aem

Curl Command to setup SSL in AEM 6.5


The curl command mentioned in the below official documentation of Adobe works fine for AEM 6.3, however for AEM 6.5 it results in HTTP 500 Error- NullPointerException.

curl \
  -u user:password \
  -F "keystorePassword=password" \
  -F "keystorePasswordConfirm=password" \
  -F "truststorePassword=password" \
  -F "truststorePasswordConfirm=password" \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "httpsHostName=host.example.com" \
  -F "httpsPort=8443" \   
  http://host:port/libs/granite/security/post/sslSetup.html



*ERROR* [POST /lib/granite/security/post/sslSetup.html HTTP/1.1]
com.adobe.granite.security.user.ui.internal.servlets.SSLConfigurationServlet Error while Configuring SSL:
java.lang.NullPointerException: null
          at java.util.Hashtable.put (Hashtable.java:460)
          at com.adobe.granite.security.user.ui.internal.servlets.SSLConfigurationServlet.configureSSLConnectionFactory(SSLConfigurationServlet.java:525)
          [com.adobe.granite.security.ui:1.0.58]
          at com.adobe.granite.security.user.ui.internal.servlets.SSLConfigurationServlet.doPost(SSLConfigurationServlet.java:374)
          [com.adobe.granite.security.ui:1.0.58]

https://helpx.adobe.com/experience-manager/6-5/sites/administering/using/ssl-by-default.html

Looking for suggestion on what should be the command for 6.5 then.

I am working on some automation tasks, due to which I need to setup SSL via command line only and not via the SSL wizard.

When I try manually via the SSL Wizard, its successful, but not working via the above curl command.


Solution

  • Resolved . The attribute need to be httpsHostname not httpsHostName . Lower case 'n' and not Upper case 'N'