apprtc
apprtc copied to clipboard
Trusting certificates SSL
Trusting certificates android , can you please help with this code ,
i am new to java and i am trying to use this code
private SSLContext trustCert() throws CertificateException, IOException, KeyStoreException,
NoSuchAlgorithmException, KeyManagementException {
AssetManager assetManager = getAssets();
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Certificate ca = cf.generateCertificate(assetManager.open("COMODORSADomainValidationSecureServerCA.crt"));
Create a KeyStore containing our trusted CAs
String keyStoreType = KeyStore.getDefaultType();
KeyStore keyStore = KeyStore.getInstance(keyStoreType);
keyStore.load(null, null);
keyStore.setCertificateEntry("ca", ca);
// Create a TrustManager that trusts the CAs in our KeyStore
String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
tmf.init(keyStore);
// Create an SSLContext that uses our TrustManager
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, tmf.getTrustManagers(), null);
return context;
}
i downloade the certificate and i imported it to drawable folder, but i dont know how to call it , can you please help me
I have been pass the https connection to apprtc, but now my error is:
Messages:
WebSocket open error: WebSocket error. WebSocket register error: WebSocket error.Version:
branch: master time: Fri Mar 9 17:06:42 2018 +0100 gitHash: 20cdd7652d58c9cf47ef92ba0190a5505760dc05
I run on Centos 6.10 so I can't build apprtc with grunt. I just copy builed version from ubuntu and paste on VPS CentOS, It ran but still error.
For SSL config for apprtc, install stunnel5
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ssl-tunnel-using-stunnel-on-ubuntu
you should build a vps for get cert file
Config stunnel with your website url, not ip address
$ vi /etc/stunnel/stunnel.conf
client = no [apprtc] accept = 443 sslVersion = TLSv1.1 connect = yoursite.com:8080 cert = /etc/stunnel/cert.pem
Run stunnel stunnel5 /etc/stunnel/stunnel.conf
Run apprtc by Google cloud sdk nohup /root/uav-project/sdk/google-cloud-sdk/bin/dev_appserver.py --host yoursite.com --port 8080 /root/apprtc/out/app_engine/ &
checking stunnel
netstat -lntu You will see port 443 and 8080 are opening Goto https://yoursite.com
I have been pass the https connection to apprtc, but now my error is:
Messages: WebSocket open error: WebSocket error. WebSocket register error: WebSocket error. Version: branch: master time: Fri Mar 9 17:06:42 2018 +0100 gitHash: 20cdd76
I run on Centos 6.10 so I can't build apprtc with grunt. I just copy builed version from ubuntu and paste on VPS CentOS, It ran but still error. For SSL config for apprtc, install stunnel5 https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ssl-tunnel-using-stunnel-on-ubuntu you should build a vps for get cert file Config stunnel with your website url, not ip address
$ vi /etc/stunnel/stunnel.conf
client = no [apprtc] accept = 443 sslVersion = TLSv1.1 connect = yoursite.com:8080 cert = /etc/stunnel/cert.pem
Run stunnel stunnel5 /etc/stunnel/stunnel.conf
Run apprtc by Google cloud sdk nohup /root/uav-project/sdk/google-cloud-sdk/bin/dev_appserver.py --host yoursite.com --port 8080 /root/apprtc/out/app_engine/ &
checking stunnel
netstat -lntu You will see port 443 and 8080 are opening Goto https://yoursite.com
same problem with you . how do you solve it ?
same problem with you . how do you solve it ? Check your turn server, using user-password authentication You can google search github keyword with my account for more info how to resolve: hieu19926 or einsteinarbert