wso2 / product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
184 stars 181 forks source link

Getting CN error during Mutual SSL with device with self-signed certificate and device IMEI as CN #1865

Open bouroy opened 6 years ago

bouroy commented 6 years ago

Description: I am currently configure Auto Enrolling with Mutual SSL and self-signed certificate according to the documentation, however getting the error below:

TID: [-1234] [] [2018-09-10 22:54:48,017] ERROR {org.wso2.carbon.webapp.authenticator.framework.authenticator.CertificateAuthenticator} - KeystoreException occurred {org.wso2.carbon.webapp.authenticator.framework.authen ticator.CertificateAuthenticator} org.wso2.carbon.certificate.mgt.core.exception.KeystoreException: Invalid name exception while trying to create a LDAP name using the distinguished name at org.wso2.carbon.certificate.mgt.core.impl.CertificateGenerator.verifyCertificateDN(CertificateGenerator.java:335) at org.wso2.carbon.certificate.mgt.core.service.CertificateManagementServiceImpl.verifySubjectDN(CertificateManagementServiceImpl.java:110) at org.wso2.carbon.webapp.authenticator.framework.authenticator.CertificateAuthenticator.authenticate(CertificateAuthenticator.java:79) at org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: javax.naming.InvalidNameException: Invalid name: 357652064937516 at javax.naming.ldap.Rfc2253Parser.doParse(Rfc2253Parser.java:111) at javax.naming.ldap.Rfc2253Parser.parseDn(Rfc2253Parser.java:70) at javax.naming.ldap.LdapName.parse(LdapName.java:785) at javax.naming.ldap.LdapName.<init>(LdapName.java:123) at org.wso2.carbon.certificate.mgt.core.impl.CertificateGenerator.verifyCertificateDN(CertificateGenerator.java:333) ... 18 more Affected Product Version: WSO2 IoT Server 3.3.0

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity.