* commit '0f6acb548b61eabff2a78366c05a8e8c10e25850': Add additional analytics regarding our SSLSockets
This commit is contained in:
commit
ab743fb543
@ -122,10 +122,13 @@ public class MailTransport {
|
|||||||
if (canTrySslSecurity() && !canTrustAllCertificates()) {
|
if (canTrySslSecurity() && !canTrustAllCertificates()) {
|
||||||
verifyHostname(mSocket, getHost());
|
verifyHostname(mSocket, getHost());
|
||||||
}
|
}
|
||||||
|
Analytics.getInstance().sendEvent("socket_certificates",
|
||||||
|
"open", Boolean.toString(canTrustAllCertificates()), 0);
|
||||||
if (mSocket instanceof SSLSocket) {
|
if (mSocket instanceof SSLSocket) {
|
||||||
final SSLSocket sslSocket = (SSLSocket) mSocket;
|
final SSLSocket sslSocket = (SSLSocket) mSocket;
|
||||||
if (sslSocket.getSession() != null) {
|
if (sslSocket.getSession() != null) {
|
||||||
Analytics.getInstance().sendEvent("cipher_suite", "open",
|
Analytics.getInstance().sendEvent("cipher_suite",
|
||||||
|
sslSocket.getSession().getProtocol(),
|
||||||
sslSocket.getSession().getCipherSuite(), 0);
|
sslSocket.getSession().getCipherSuite(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -167,9 +170,12 @@ public class MailTransport {
|
|||||||
mIn = new BufferedInputStream(mSocket.getInputStream(), 1024);
|
mIn = new BufferedInputStream(mSocket.getInputStream(), 1024);
|
||||||
mOut = new BufferedOutputStream(mSocket.getOutputStream(), 512);
|
mOut = new BufferedOutputStream(mSocket.getOutputStream(), 512);
|
||||||
|
|
||||||
|
Analytics.getInstance().sendEvent("socket_certificates",
|
||||||
|
"reopenTls", Boolean.toString(canTrustAllCertificates()), 0);
|
||||||
final SSLSocket sslSocket = (SSLSocket) mSocket;
|
final SSLSocket sslSocket = (SSLSocket) mSocket;
|
||||||
if (sslSocket.getSession() != null) {
|
if (sslSocket.getSession() != null) {
|
||||||
Analytics.getInstance().sendEvent("cipher_suite", "reopenTls",
|
Analytics.getInstance().sendEvent("cipher_suite",
|
||||||
|
sslSocket.getSession().getProtocol(),
|
||||||
sslSocket.getSession().getCipherSuite(), 0);
|
sslSocket.getSession().getCipherSuite(), 0);
|
||||||
}
|
}
|
||||||
} catch (SSLException e) {
|
} catch (SSLException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user