Skip to content

Configuring m2e-core to allow self signed certificate ? #1156

Answered by glhez
glhez asked this question in Q&A
Discussion options

You must be logged in to vote

I ran the whole in debug and ran into this error while trying to reproduce my issue:

SSLPeerUnverifiedException: Hostname privaterepo not verified:
    certificate: sha256/...
    DN: CN=PRIVATEREPO, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=FR
    subjectAltNames: []

The error is thrown from this method: RealConnection and the implementation of OkHostnameVerifier only reads the subject alternative names (SAN) and my certificate did not have one.

I did not dig into maven with debug itself but I think the difference of behaviour lies in the use of wagon-http and httpclient 4.5. Its HostnameVerifier validate the CN if no SAN name are found..

From the last commit/PR of OkHostnameVerif…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@glhez
Comment options

@laeubi
Comment options

@glhez
Comment options

@laeubi
Comment options

Comment options

You must be logged in to vote
1 reply
@laeubi
Comment options

Comment options

You must be logged in to vote
2 replies
@laeubi
Comment options

@glhez
Comment options

Answer selected by glhez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants