Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from DeeJay0921/basic-algorithm
# 初步完成了基本算法
- Loading branch information
Showing
3 changed files
with
119 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.github.DeeJay0921; | ||
|
||
import javax.net.ssl.TrustManager; | ||
import javax.net.ssl.X509TrustManager; | ||
import java.security.cert.X509Certificate; | ||
|
||
public class MiTM implements TrustManager, X509TrustManager { | ||
public X509Certificate[] getAcceptedIssuers() { | ||
return null; | ||
} | ||
|
||
public boolean isServerTrusted(X509Certificate[] certs) { | ||
return true; | ||
} | ||
|
||
public boolean isClientTrusted(X509Certificate[] certs) { | ||
return true; | ||
} | ||
|
||
public void checkServerTrusted(X509Certificate[] certs, String authType) { | ||
} | ||
|
||
public void checkClientTrusted(X509Certificate[] certs, String authType) { | ||
} | ||
} | ||
|