You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/08/14 02:47:09 UTC
[GitHub] [cordova-plugin-file-transfer] wynngd commented on issue #203:
fileTransfer.download from https return error code 3 (SSL handshake) in
android
wynngd commented on issue #203: fileTransfer.download from https return error code 3 (SSL handshake) in android
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/203#issuecomment-521081569
Sorry @uldcra for the late reply. I am pretty busy the past few days...
In the FileTransfer.java under Android Source, include this function:
private static final HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() {
public boolean verify(String hostname, SSLSession session) {
return true;
}
};
and then in the function, insert this between line 760 and 761
// Setup the HTTPS connection class to trust everyone
HttpsURLConnection https = (HttpsURLConnection)connection;
oldSocketFactory = trustAllHosts(https);
// Save the current hostnameVerifier
oldHostnameVerifier = https.getHostnameVerifier();
// Setup the connection not to verify hostnames
https.setHostnameVerifier(DO_NOT_VERIFY);
This will skip the HTTPS SSL Cert verification.
I attached my code. (just change it back to .java)
[FileTransfer.txt](https://github.com/apache/cordova-plugin-file-transfer/files/3499621/FileTransfer.txt)
Again sorry for the delay...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org