Using Self Signed Certificates - lgallard/qBittorrent-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 generate a BouncyCastle Keystore (BKS) to use self-signed certificates with qBittorrent Controller.
This document explains how to generate the self-signed certificate, how to create a BKS file with that certificate, and how to use it in qBittorrent Controller.
- Generate a Private Key
openssl genrsa -des3 -out qbserver.key 1024
-
Generate a CSR (Certificate Signing Request)
openssl req -new -key qbserver.key -out qbserver.csr
Country Name (2 letter code) [GB]:US State or Province Name (full name) [Berkshire]: FL Locality Name (eg, city) [Newbury]:Miami Organization Name (eg, company) [My Company Ltd]: None Ltd Organizational Unit Name (eg, section) []: Information Technology Common Name (eg, your name or your server's hostname) []: your.domain.com Email Address []: [email protected] Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
-
Remove Passphrase from Key
cp qbserver.key qbserver.key.org openssl rsa -in qbserver.key.org -out qbserver.key
-
Generating a Self-Signed Certificate
openssl x509 -req -days 730 -in qbserver.csr -signkey qbserver.key -out qbserver.crt
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:
======= **Click here to see the remaining screenshots** =======
Download the latest Bouncy Castle Provider from here. 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 qbserver.crt -alias your.domain.com -keystore qbc.bks -storetype BKS -storepass 'testtest'
-
In Settings configure your hostname
-
And then go to Advanced settings
-
In Advanced, enable the https
-
Then touch on Self-signed certificate keystore
-
Browse to the directory paths where the keystore was saved
-
Choose the keystore file:
-
Check you chose the correct keystore file
-
Set your keystore password (or leave it blank if it doesn't apply)