Using https & Self Signed Certificates - lgallard/youTorrent-Controller GitHub Wiki
Due to Google is now more strict in the handling of SSL certificates in Android, they forced developers stop using insecure implementations for self-signed certificates. To accomplish this now you must use a BouncyCastle Keystore (BKS) to use self-signed certificates with youTorrent Controller.
You can use this keystore, which was created from a uTorrent server (blank password), and use it in youTorrent Controller.
Alternatively you can generate your own BouncyCastle keystore following the steps explained next.
###Getting the certificate
- Get the your the certificate from your uTorrent server:
openssl s_client -showcerts -connect 192.168.1.101:8080 </dev/null > utorrent.crt
In this example uTorrent IP address is 192.168.1.101 and is listening on port 8080.
-
Edit the utorrent.crt file, and leave only the certificate information:
-----BEGIN CERTIFICATE----- MIICTjCCAbegAwIBAgIBADANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJVUzEL MAkGA1UECAwCQ0ExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkJp dFRvcnJlbnQxETAPBgNVBAsMCHVUb3JyZW50MREwDwYDVQQDDAh1VG9ycmVudDAe Fw0xNjA0MDMxOTM5MDBaFw0xNzA0MDgxOTM5MDBaMG0xCzAJBgNVBAYTAlVTMQsw CQYDVQQIDAJDQTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzETMBEGA1UECgwKQml0 VG9ycmVudDERMA8GA1UECwwIdVRvcnJlbnQxETAPBgNVBAMMCHVUb3JyZW50MIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDZCjmFZb/lS/Va4KGXPaaMZvRi5vo5 2z8d0T3V1sm7hr/2eZibWvRoKei2cgV86UYbLm+Wj5MMVaMXBuorRooIcf9HnwqD lrJwmfZ67KwBodFSZd5fRtAFjHy2HtkhQe3nEDHYLAEiytUY0YEQ+4rG4uYrOOEa WWqlDmzynlWoVQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAGmwuL5Toz8k8okM5i6T wMm/tiuF1d18RaFBX5TpxYFw9IVXnY/OfBdgdMrBjA9+JAQc4RsGyPQk3rIyxIos pbys7HiLgrq96f8qx2qNggSs9edGcnPOdaCgw//eMxL0LwTeJcutCgcGsqU5uaG8 E4qIfUbXSwWTfuEuCOrveO3p -----END CERTIFICATE-----
###Creating the BKS keystore using Portecle
Portecle is a user friendly GUI application for creating, managing and examining keystores and more. This is the easies way.
You can download Portecle from here, the follow these steps:

<details>
<summary> ======= **Click here to see the remaining screenshots** =======</summary>












</details>
###Creating the BKS keystore using keytool
Download the latest Bouncy Castle Provider from <a href="https://www.bouncycastle.org/latest_releases.html" target="_blank">here</a>. This examples uses version jdk15on-154
wget https://www.bouncycastle.org/download/bcprov-jdk15on-154.jar
keytool -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath ./bcprov-jdk15on-154.jar -importcert -v -trustcacerts -file utorrent.crt -alias your.domain.com -keystore utorrent.bks -storetype BKS -storepass 'testtest'
###Using the BKS keystore in youTorrent Controller
1. In Settings configure your hostname
2. And then go to Advanced settings
3. In Advanced, enable the https
4. Then touch on Self-signed certificate keystore
<BR/>
<BR/>


<BR/>
<BR/>
5. Browse to the directory paths where the keystore was saved
6. Choose the keystore file
<BR/>
<BR/>


<BR/>
<BR/>
7. Check you chose the correct keystore file
8. Set your keystore password (or leave it b kank if apply)
<BR/>
<BR/>

<BR/>
### References ###
* <a href="http://www.akadia.com/services/ssh_test_certificate.html" target="_blank">How to create a self-signed SSL Certificate</a>
* <a href="http://stackoverflow.com/questions/4065379/how-to-create-a-bks-bouncycastle-format-java-keystore-that-contains-a-client-c" target="_blank">How to create a BKS (BouncyCastle) format Java Keystore that contains a client certificate chain</a>