-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
247 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/org/matomo/java/tracking/TrustingHostnameVerifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.matomo.java.tracking; | ||
|
||
import edu.umd.cs.findbugs.annotations.Nullable; | ||
import javax.net.ssl.HostnameVerifier; | ||
import javax.net.ssl.SSLSession; | ||
|
||
class TrustingHostnameVerifier implements HostnameVerifier { | ||
|
||
@Override | ||
public boolean verify( | ||
@Nullable | ||
String hostname, | ||
@Nullable | ||
SSLSession session | ||
) { | ||
return true; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/org/matomo/java/tracking/TrustingX509TrustManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.matomo.java.tracking; | ||
|
||
import edu.umd.cs.findbugs.annotations.Nullable; | ||
import java.security.cert.X509Certificate; | ||
import javax.net.ssl.X509TrustManager; | ||
|
||
class TrustingX509TrustManager implements X509TrustManager { | ||
|
||
@Override | ||
@Nullable | ||
public X509Certificate[] getAcceptedIssuers() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void checkClientTrusted( | ||
@Nullable X509Certificate[] chain, @Nullable String authType | ||
) { | ||
// no operation | ||
} | ||
|
||
@Override | ||
public void checkServerTrusted( | ||
@Nullable X509Certificate[] chain, @Nullable String authType | ||
) { | ||
// no operation | ||
} | ||
} |
Oops, something went wrong.