admin管理员组

文章数量:1336711

I get an SSLPeerUnverifiedException after switching from HTTP to HTTPS which I don't understand since the wildcard certificate should work for the URL.

javax.ssl.SSLPeerUnverifiedException: Certificate for <abc.lan.corp> doesn't match any of the subject alternative names: [*.lan.corp]
 at .apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:507)
 at .apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:437)
 at .apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
 at .apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
 at .apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
 at .apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
 at .apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
 at .apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
 at .apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
 at .apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
 at .apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
 at .apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
 at .apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
 at lan.corp.sapconnector.client.SAPDownloader.download(SAPDownloader.java:31)
 at lan.corp.sapconnector.client.download.DownloadClient.getSAPInformation(DownloadClient.java:62)
 at lan.corp.sapconnector.client.download.DownloadClient.executeDelegate(DownloadClient.java:33)
 at lan.corp.sapconnector.client.AbstractClient.execute(AbstractClient.java:23)
 at lan.corp.sapconnector.SapSyncMixin.lambda$4(SapSyncMixin.java:93)
 at lan.corp.sapconnector.SapSyncMixin$$Lambda$32/0x0000000000000000.apply(Unknown Source)
 at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
 at java.util.Iterator.forEachRemaining(Iterator.java:116)
 at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:497)
 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:487)
 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:241)
 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
 at .jooq.lambda.SeqImpl.collect(SeqImpl.java:190)
 at .jooq.lambda.Seq.toList(Seq.java:9194)
 at .jooq.lambda.SeqImpl.toList(SeqImpl.java:558)
 at lan.corp.sapconnector.SapSyncMixin.runSync(SapSyncMixin.java:99)
 at lan.corp.sapconnector.SapSyncMixin$$Lambda$5/0x0000000000000000.accept(Unknown Source)
 at java.util.Optional.ifPresent(Optional.java:159)
 at lan.corp.sapconnector.SapSyncMixin.runSync(SapSyncMixin.java:61)
 at lan.corp.sapconnector.SapSyncMixin.runSync(SapSyncMixin.java:54)
 at .corp.domino.abrechnungs.agent.SapSyncAgentBase.NotesMain(SapSyncAgentBase.java:15)
 at lotus.domino.AgentBase.runNotes(Unknown Source)
 at lotus.domino.NotesThread.run(Unknown Source)

The used Java runtime version is 1.8.0_302-b08 and the failing https request is made with Apache HTTP client 4.5.9

Accessing the same server with Google Chrome reports the certificate as valid with same URL.

Any ideas?

本文标签: sslReason for wildcard certificate issue with Apache HTTP Client and Java 8Stack Overflow