1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-02-22 21:52:19 -05:00
Joe Steele 6f14294164 Remove SslHelper. Don't use SecureRandom.
SslHelper has been removed, and its functionality has been transferred
into TrustedSocketFactory.  The added layer of indirection wasn't really
simplifying anything.  It's now easier to see what happens when
createSocket() is invoked.

A new instance of SecureRandom is no longer passed to SSLContext.init().
Instead, null is passed.

The (default) provider of the TLS SSLContext used is OpenSSLProvider,
which provides an SSLSocket instance of type OpenSSLSocketImpl.  The only
use of SecureRandom is in OpenSSLSocketImpl.startHandshake(), where it is
used to seed the OpenSSL PRNG with additional random data.  But if
SecureRandom is null, then /dev/urandom is used for seeding instead.

Meanwhile, the default provider for the SecureRandom service is
OpenSSLRandom, which uses the OpenSSL PRNG as its data source.  So we were
effectively seeding the OpenSSL PRNG with itself.  That's probably okay
(we trust that the OpenSSL PRNG was properly initialized with random data
before first use), but using /dev/urandom would seem like a better source
(or at least as good a source) for the additional seed data added with
each new connection.

Note that our PRNGFixes class replaces the default SecureRandom service
with one whose data source is /dev/urandom for certain vulnerable API
levels anyway.  (It also makes sure that the OpenSSL PRNG is properly
seeded before first use for certain vulnerable API levels.)
2014-09-06 18:15:25 -04:00
2014-01-04 01:52:09 +01:00
2013-11-11 01:09:09 +01:00
2014-06-21 15:33:45 +02:00
2014-03-01 05:02:17 +01:00
2014-06-21 17:09:45 +02:00
2014-06-21 17:09:45 +02:00
2014-04-18 16:55:41 +02:00
2014-06-21 17:09:45 +02:00
2013-11-07 06:48:10 +01:00
2013-11-07 06:48:10 +01:00
2014-04-08 21:03:33 +02:00
2014-06-21 17:09:45 +02:00
2014-06-21 17:09:45 +02:00
2014-06-21 17:09:45 +02:00
Description
No description provided
887 MiB
Languages
Java 69.2%
PostScript 30.2%
Perl 0.3%
Gradle 0.2%