1. 09 Oct, 2014 1 commit
    • Neil Fuller's avatar
      Apply conscrypt changes from merge commit · ea961ada
      Neil Fuller authored
      Merge commit 8b188b864302f5ea9df17636b378938a15b4605a was incomplete
      because some conscrypt files have been moved into a separate repo.
      
      There have been various changes in conscrypt which renders changes to:
      
      crypto/src/main/java/org/conscrypt/OpenSSLServerSocketImpl.java
      crypto/src/main/java/org/conscrypt/OpenSSLSocketImpl.java
      crypto/src/test/java/org/conscrypt/CipherSuiteTest.java
      
      unnecessary.
      
      This is effectively the same change as conscrypt
      commit 8d7e23e1.
      
      Change-Id: I0f8199f3bf39a035ad5453be6fea92f511dcf548
      ea961ada
  2. 08 May, 2014 1 commit
  3. 16 Jan, 2014 1 commit
    • Kenny Root's avatar
      Track update to OpenSSL 1.0.1f · f33b51ba
      Kenny Root authored
      The constants for handshake cutthrough and CBC record splitting were changed
      during the upgrade to OpenSSL 1.0.1f. This changes NativeCrypto.java to track them.
      
      Change-Id: I9e385c323d5557c5d50cffe3ce797dcf89667ad9
      f33b51ba
  4. 06 Jan, 2014 1 commit
  5. 19 Dec, 2013 1 commit
  6. 18 Dec, 2013 3 commits
    • Alex Klyubin's avatar
      Actually prefer Forward Secrecy cipher suites. · 5aa3d431
      Alex Klyubin authored
      The documentation for the list of TLS/SSL cipher suites used by
      default states that cipher suites offering Forward Secrecy are
      preferred. This CL adjusts the list to conform: FS cipher suites
      that use RC4_128 bulk encryption algorithm were not preferred
      over non-FS cipher suites that use AES.
      
      Bug: 11220570
      Change-Id: Ic9019306898600086920874474764186b710c3ef
      5aa3d431
    • Alex Klyubin's avatar
      Disable 3DES cipher suites in SSLSocket. · c1cc669c
      Alex Klyubin authored
      The effective key length for 3DES_EDE bulk encryption algorithm
      is only 112 bits. We're now aiming for 128 and higher.
      
      Scans show that removing these cipher suites from the default list
      causes handshake issues only with 0.15% of the ecosystem.
      
      Bug: 11220570
      Change-Id: Ie01ebe8134d08a36b276295b804540157963be8f
      c1cc669c
    • Alex Klyubin's avatar
      Disable static server key ECDH cipher suites in SSLSocket. · 30695d65
      Alex Klyubin authored
      These cipher suites use a static key for ECDH on the server side.
      When client certificates are used, a static key is also used on the
      client side, leading to the same premaster secret for all connections
      between a particular client and server. Also, these cipher suites do
      not provide forward secrecy.
      
      Scans show that removing these cipher suites from the default list
      does not affect connectivity to servers and is thus safe.
      
      Bug: 11220570
      Change-Id: If34f4a3888ed9972c39d171656a85c61dfa98ea1
      30695d65
  7. 17 Dec, 2013 3 commits
    • Alex Klyubin's avatar
      Enable AES-GCM cipher suites by default in SSLSocket. · 5add959a
      Alex Klyubin authored
      AES-GCM is preferred to AES-CBC whose MAC-pad-then-encrypt approach
      has issues (e.g., Lucky 13 attack).
      
      Bug: 11220570
      Change-Id: Ib007bc89ccf08358ed3f093f630350fa859e7c35
      5add959a
    • Alex Klyubin's avatar
      Enable support for TLSv1.2 cipher suites in SSLSocket. · 336e8eb9
      Alex Klyubin authored
      This adds support for AES-GCM and AES-CBC with MACs based on SHA256
      and SHA384.
      
      Bug: 11220570
      Change-Id: I56e7e25c5cd65a4c7662da6d4bbe5720f427e677
      336e8eb9
    • Alex Klyubin's avatar
      Enable TLSv1.1 and TLSv1.2 by default for SSLSocket. · 1f63d2c2
      Alex Klyubin authored
      TLSv1.1 and TLSv1.2 offer built-in protection against BEAST attack
      and support for GCM cipher suites.
      
      This change causes TLS/SSL handshake failures with a small fraction
      of servers, load balancers and TLS/SSL accelerators with broken
      TLS/SSL implementations.
      
      Scans demonstrate that the number is around 0.6%. Breaking
      connectivity (using platform default settings) to a tiny minority of
      the ecosystem is acceptable because this inconvenience is outweighed
      by the added safety for the overwheling majority of the ecosystem.
      
      App developers affected by this issue should consider asking such
      servers to be fixed or explicitly disabling TLSv1.1 and TLSv1.2 in
      their apps.
      
      Bug: 11220570
      Change-Id: Ice9e8ce550401ba5e3385fd369c40f01c06ac7fd
      1f63d2c2
  8. 25 Nov, 2013 1 commit
  9. 08 Nov, 2013 1 commit
  10. 07 Nov, 2013 2 commits
  11. 06 Nov, 2013 1 commit
  12. 25 Oct, 2013 1 commit
    • Alex Klyubin's avatar
      Do not use short-keyed TLS/SSL cipher suites by default. · 68f4753f
      Alex Klyubin authored
      This removes TLS/SSL cipher suites with bulk cipher secret keys
      shorter than 80 bits from the list of cipher suites used by default:
      * export-strength cipher suites, and
      * cipher suites using DES (but not 3DES) as their bulk cipher.
      
      Bug: 11220570
      Change-Id: I04e30f6d634801b36018fecc8f2b257fc6b7adfc
      68f4753f
  13. 13 Sep, 2013 4 commits
  14. 30 Aug, 2013 1 commit
    • Kenny Root's avatar
      Move conscrypt out libjavacore and split tests · eaeedc31
      Kenny Root authored
      To make the situation with testing a little better and enable building
      core libraries totally independent of conscrypt, move the native
      registration to a JNI_OnLoad scheme. Also, since we want to separate the
      testing, make conscrypt build its own tests library.
      
      Change-Id: I9f2831839059c1c012ec7bdeab2f90b4e2f44bfd
      eaeedc31
  15. 25 Jun, 2013 1 commit
    • Kenny Root's avatar
      NativeCrypto: Add ALPN support · 6fcf0cbe
      Kenny Root authored
      This adds the ability to use Application-Layer Protocol Negotiation
      (ALPN) as both a client and a server. ALPN is essentially like Next
      Protocol Negotiation (NPN) but negotiation is done in the clear. This
      allows the use of other protocols on the same port (e.g., SPDY instead
      of HTTP on port 80).
      
      Although previously clients using NPN were able to use cut-through, the
      new ALPN API does not provide for a way for a client to enable that
      during a callback. So the only difference is that NPN clients can enable
      SSL False Start while ALPN clients cannot currently.
      
      Change-Id: I42ff70f3711e9cccaf754d189f76eeaa9db5f981
      6fcf0cbe
  16. 07 May, 2013 1 commit
    • Kenny Root's avatar
      NativeCrypto: Fix a lot of random doc bugs · 209c986c
      Kenny Root authored
      Remove lots of empty javadoc tags that were unused or invalid.
      Remove some unused imports.
      Mark a few input streams as intentionally unclosed.
      
      Change-Id: I04d8642abd2b0f2e9be02e227658a1b9bd192d24
      209c986c
  17. 06 May, 2013 3 commits
  18. 03 May, 2013 2 commits
    • Kenny Root's avatar
      NativeCrypto: move key conversion to Java · 1ecc0481
      Kenny Root authored
      Key type conversion in native code is from the legacy period before the
      OpenSSLKey class existed. Use that to hold PKEY reference instead of
      converting it in native code.
      
      Change-Id: I84e9a6e1f2e0f95d2f44c18fa9f65cd15e039d63
      1ecc0481
    • Kenny Root's avatar
      Move encoding method out of NativeCrypto · 3ff2b34d
      Kenny Root authored
      Move the encoding method for X.509 out of NativeCrypto to the class that
      uses it.
      
      Change-Id: I57198101553f309c04b5e757716d1d807eb99a90
      3ff2b34d
  19. 02 May, 2013 1 commit
  20. 29 Apr, 2013 1 commit
    • Kenny Root's avatar
      Move JSSE to new package · 860d2707
      Kenny Root authored
      To help with shipping the JSSE with apps that want to bundle it, move
      it to a new package so that the tangles in other parts of the library
      can be untangled.
      
      Change-Id: I810b6861388635301e28aee5b9b47b8e6b35b430
      860d2707
  21. 01 Apr, 2013 2 commits
    • Kenny Root's avatar
      NativeCrypto: adjust BasicConstraints check · 40c81bd3
      Kenny Root authored
      OpenSSL checks KeyUsage for "Certificate Signing" when checking for a
      CA, but Java just specifies that the getBasicConstraints call only looks
      at the BasicConstraints itself.
      
      (cherry picked from commit cd59afd3e34cb6b3645babdace22c03882e0ec19)
      
      Bug: 8488314
      Change-Id: I72f8d6679169480960630bd73745ebf4c55b383c
      40c81bd3
    • Kenny Root's avatar
      NativeCrypto: adjust BasicConstraints check · 9ec4f876
      Kenny Root authored
      OpenSSL checks KeyUsage for "Certificate Signing" when checking for a
      CA, but Java just specifies that the getBasicConstraints call only looks
      at the BasicConstraints itself.
      
      Bug: 8488314
      Change-Id: I072cd2e9f1a9295a717f7587817149200113c65f
      9ec4f876
  22. 29 Mar, 2013 2 commits
    • Alex Klyubin's avatar
      Switch OpenSSLECDHKeyAgreement to KeyFactory.translateKey. · fd7d8c36
      Alex Klyubin authored
      OpenSSL KeyFactory.translateKey encapsulates all the functionality
      for translating arbitrary Key instances to OpenSSL-backed Key
      instances. Thus, there's no need to replicate that functionality
      elsewhere.
      
      (cherry picked from commit 0469e3a6a9b5e854b8b985039de8ba4f6e6037bd)
      
      Change-Id: I4caa0021e51a83be6932617117275fd033b6d5f7
      fd7d8c36
    • Alex Klyubin's avatar
      Switch OpenSSLECDHKeyAgreement to KeyFactory.translateKey. · d5107430
      Alex Klyubin authored
      OpenSSL KeyFactory.translateKey encapsulates all the functionality
      for translating arbitrary Key instances to OpenSSL-backed Key
      instances. Thus, there's no need to replicate that functionality
      elsewhere.
      
      Change-Id: I4caa0021e51a83be6932617117275fd033b6d5f7
      d5107430
  23. 18 Mar, 2013 1 commit
    • Kenny Root's avatar
      NativeCrypto: throw exception on invalid DNS altname · 36e383e2
      Kenny Root authored
      When we receive an invalid DNS alt name (e.g., contains characters
      outside of the ASCII printable range), we should throw an exception to
      match the previous behavior. This is not validated this against the RI
      since the tests currently don't work, but it brings the behavior back to
      what it was previously.
      
      Also amend the previous ASN.1 string check to use
      ASN1_PRINTABLE_type(...) which actually scans the string to check its
      contents. This is what was meant in the last patch.
      
      Bug: 8398461
      Change-Id: I260f045a2e144fb9ded7e1d3aa46592da8f63272
      36e383e2
  24. 12 Mar, 2013 1 commit
    • Alex Klyubin's avatar
      Switch TLS Channel ID API from ECPrivateKey to PrivateKey. · 4022a5d0
      Alex Klyubin authored
      This is to accept both the "transparent" and "opaque" ECC private
      keys. "Transparent" keys provide structured access to their key
      material -- these are instances of ECPrivateKey. "Opaque" private
      keys are not required to provide structured (or even any) access to
      their key material -- these are instances of PrivateKey.
      
      Change-Id: I3fdc4c46675bde48c72424f1cc8f59c3d6b89f0e
      4022a5d0
  25. 11 Mar, 2013 1 commit
  26. 08 Mar, 2013 2 commits
    • Kenny Root's avatar
      NativeCrypto: add CertPath encoding PkiPath · f0bb425e
      Kenny Root authored
      Set the default encoding to be PkiPath to conform to other
      implementations. This now passes all the tests.
      
      Change-Id: I8475e328e8440aa3ecccd88c34e2aba6bc169be5
      f0bb425e
    • Kenny Root's avatar
      NativeCrypto: add CertPath support with PKCS7 · e1429740
      Kenny Root authored
      Add support for generating CertPath with the
      OpenSSLX509CertificateFactory implementation.
      
      This only will encode withrPKCS7 currently. This means it fails the
      CertPath serialization test because the serialization and
      de-serialization code only uses a provider's default serialization
      format. Since this provider is not the default provider and the
      default provider uses PkiPath as its default format, the
      OpenSSLX509CertPath still fails the tests.
      
      This seems like a problem with the way CertPath is serialized. The
      impact of this seems to be that a CertPath implementation must have
      "PkiPath" as its default encoding.
      
      Change-Id: Ie0e3577746345108301b02e7a1d4e8ea189f2bda
      e1429740