summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-30Merge from Chromium at DEPS revision 267aeeb8d85candroid-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1lollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releasePrimiano Tucci
This commit was generated by merge_to_master.py. Change-Id: I9b1c013632df72dcd4e450d6a3b7749444191f77
2014-09-26Merge third_party/boringssl/src from ↵Android Chromium Automerger
https://boringssl.googlesource.com/boringssl.git at 01fe820ab957514f6b83e511492de1b3c03649d5 This commit was generated by merge_from_chromium.py. Change-Id: Ic03398af24c5f9382f97f578539898b8d46d6036
2014-09-25Add tests for client version negotiation and session resumption.David Benjamin
BUG=chromium:417134 Change-Id: If5914be98026d899000fde267b2d329861ca3136 Reviewed-on: https://boringssl-review.googlesource.com/1822 Reviewed-by: Adam Langley <agl@google.com>
2014-09-25Handle session resumption in SSLv23_client_method.David Benjamin
This fixes version mismatches on resumption without rewriting the entirety of OpenSSL's version negotiation logic. (Which still badly needs to happen.) BUG=chromium:417134 Change-Id: Ifa0c5dd2145e37fcd39eec25dfb3561ddb87c9f0 Reviewed-on: https://boringssl-review.googlesource.com/1823 Reviewed-by: Adam Langley <agl@google.com>
2014-09-24runner: don't resume sessions if SessionTicketsDisabled is true.David Benjamin
Change-Id: I1cf4a11d66871fff71a5fa93e39471ffb40d3132 Reviewed-on: https://boringssl-review.googlesource.com/1821 Reviewed-by: Adam Langley <agl@google.com>
2014-09-24Remove OPENSSL_NO_TLS1_2_CLIENT and OPENSSL_NO_DTLS1.David Benjamin
Get those out of the way. Change-Id: Ia1be476e383fc90c2373a24a072944fe377da6ef Reviewed-on: https://boringssl-review.googlesource.com/1820 Reviewed-by: Adam Langley <agl@google.com>
2014-09-22Disallow all special operators once groups are used.David Benjamin
+ and - should also be forbidden. Any operation other than appending will mix up the in_group bits and give unexpected behavior. Change-Id: Ieaebb9ee6393aa36243d0765e45cae667f977ef5 Reviewed-on: https://boringssl-review.googlesource.com/1803 Reviewed-by: Adam Langley <agl@google.com>
2014-09-22Remove redundant check in cipher rule parsing.David Benjamin
It's redundant with the check at the top of the loop. Change-Id: If64e5396658ca28cad937411c6fc8671a2abfdcd Reviewed-on: https://boringssl-review.googlesource.com/1802 Reviewed-by: Adam Langley <agl@google.com>
2014-09-22Add a set of tests for cipher string parsing.David Benjamin
Change-Id: I4f9cdfa443bc5916f1899a7fc90aca2bf3c6027c Reviewed-on: https://boringssl-review.googlesource.com/1801 Reviewed-by: Adam Langley <agl@google.com>
2014-09-22Switch the reason code check to a compile-time assert.David Benjamin
It's just checking some constants. Also the comment's off now. Change-Id: I934d32b76c705758ae7c18009d867e9820a4c5a8 Reviewed-on: https://boringssl-review.googlesource.com/1800 Reviewed-by: Adam Langley <agl@google.com>
2014-09-20Provide compatibility functions for PKCS#12 parsing.Adam Langley
In order to minimise the upstream diffs needed for bits of Android to build with BoringSSL, this change implements the old style PKCS#12 functions as wrappers around the modern parser. The function to read all the contents of a BIO could almost be a utility function but I'll wait until there are two uses for it first. The important change from the original functions is that these will always read the complete buffer/BIO/FILE passed in. Based on a survey of uses of d2i_PKCS12 that I found, this appears to be universally what callers want anyway. Change-Id: I3f5b84e710b161d975f91f4d16c83d44371368d1 Reviewed-on: https://boringssl-review.googlesource.com/1791 Reviewed-by: Adam Langley <agl@google.com>
2014-09-20Don't try to setup CPUID if NO_ASM.Adam Langley
Change-Id: Idec1cda87b0a58e9350d0e10c3251a2c47ac1929 Reviewed-on: https://boringssl-review.googlesource.com/1790 Reviewed-by: Adam Langley <agl@google.com>
2014-09-18Add misc functions for easier porting.Adam Langley
Android requested that the wpa_supplicant go upstream. This change adds some dummy functions and reinstates DSA_dup_DH in order to make the diff smaller and easier for upstream. Change-Id: I77ac271b8652bae5a0bbe16afde51d9096f3dfb5 Reviewed-on: https://boringssl-review.googlesource.com/1740 Reviewed-by: Adam Langley <agl@google.com>
2014-09-17Add missing errors codes for alerts.David Benjamin
This gives inappropriate_fallback and close_notify sent during the handshake error strings. It'd also avoid having to write case SSL_AD_REASON_OFFSET + SSL_AD_CLOSE_NOTIFY: in Chromium. Change-Id: I42123d5452eb7843ead883d112e58b3f087d3067 Reviewed-on: https://boringssl-review.googlesource.com/1780 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Test that ALPN is preferred over NPN.David Benjamin
Change-Id: Ia9d10f672c8a83f507b46f75869b7c00fe1a4fda Reviewed-on: https://boringssl-review.googlesource.com/1755 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Add tests for ALPN support.David Benjamin
Both as client and as server. Also tests that ALPN causes False Start to kick in. Change-Id: Ib570346f3c511834152cd2df2ef29541946d3ab4 Reviewed-on: https://boringssl-review.googlesource.com/1753 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Implement ALPN in runner.go.David Benjamin
Imported from upstream's https://codereview.appspot.com/108710046. Change-Id: I66c879dcc9fd09446ac1a8380f796b1d68c89e4e Reviewed-on: https://boringssl-review.googlesource.com/1751 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Don't deadlock if a resume test fails the first half.David Benjamin
Otherwise the child is busy waiting for its second handshake. Change-Id: Ic613eeb04c5d6c1ec1e1bbcb13946d3ac31d05f1 Reviewed-on: https://boringssl-review.googlesource.com/1752 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Improve test coverage for server_name extension.David Benjamin
Notably, this would have caught ed8270a55c3845abbc85dfeed358597fef059ea9 (although, apart from staring at code coverage, knowing to set resumeSession on the server test isn't exactly obvious). Perhaps we should systematically set it on all extension server tests; ClientHello extension parsing happens after resumption has been determined and is often sensitive to it. Change-Id: Ie83f294a26881a6a41969e9dbd102d0a93cb68b5 Reviewed-on: https://boringssl-review.googlesource.com/1750 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Remove remnants of export cipher suite selection.David Benjamin
Splitting the strength mask between SSL_EXP_MASK and SSL_STRONG_MASK no longer does anything. Also remove the SSL_NOT_EXP bit and condense the strength bits. Change-Id: I9e61acdde008c3ce06bb37f78a72099fc53ed080 Reviewed-on: https://boringssl-review.googlesource.com/1757 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Remove indirection in loading ciphers.David Benjamin
Simplify all the cipher gathering logic. The set of supported ciphers is known, so there is no need to determine if some cipher exists but doesn't work. Change-Id: Idcaae67e7bfc40a3deb925d85ee1a99a931b67e7 Reviewed-on: https://boringssl-review.googlesource.com/1756 Reviewed-by: Adam Langley <agl@google.com>
2014-09-15Fix some OPENSSL_PUT_ERROR calls.David Benjamin
Change-Id: I6a49eb5225208eed160f9bce7cb9af5145ae0df1 Reviewed-on: https://boringssl-review.googlesource.com/1754 Reviewed-by: Adam Langley <agl@google.com>
2014-09-12Merge third_party/boringssl/src from ↵Android Chromium Automerger
https://boringssl.googlesource.com/boringssl.git at a70c75cfc0ca32a43985e3f24d737ca9cafcb910 This commit was generated by merge_from_chromium.py. Change-Id: I91a215beb2f75aac538c707f2681104d0e795b88
2014-09-12Add a CRYPTO_library_init and static-initializer-less build option.David Benjamin
Chromium does not like static initializers, and the CPU logic uses one to initialize CPU bits. However, the crypto library lacks an explicit initialization function, which could complicate (no compile-time errors) porting existing code which uses crypto/, but not ssl/. Add an explicit CRYPTO_library_init function, but make it a no-op by default. It only does anything (and is required) if building with BORINGSSL_NO_STATIC_INITIALIZER. Change-Id: I6933bdc3447fb382b1f87c788e5b8142d6f3fe39 Reviewed-on: https://boringssl-review.googlesource.com/1770 Reviewed-by: Adam Langley <agl@google.com>
2014-09-11Merge third_party/boringssl/src from ↵Android Chromium Automerger
https://boringssl.googlesource.com/boringssl.git at 1195796045e1f8bbd1ed311b2cbd8b9d87f2074a This commit was generated by merge_from_chromium.py. Change-Id: I206689b4d69482d3ac6cdfce2b748e6d97f0c392
2014-09-10Ensure x86_64 perlasm output ends with a newline.David Benjamin
Appease the Mac build. Change-Id: I8b93906d8c7059fd63da9622fd530cc82bd05f7c Reviewed-on: https://boringssl-review.googlesource.com/1760 Reviewed-by: Adam Langley <agl@google.com>
2014-09-06Merge third_party/boringssl/src from ↵Android Chromium Automerger
https://boringssl.googlesource.com/boringssl.git at 7bdec13c03744049ba5f776b6418cbcfe61356cd This commit was generated by merge_from_chromium.py. Change-Id: I0ecba22aadd52001a91d760eb63d9f68dbf52ebf
2014-09-06Test SHA-256 and SHA-384 CBC-mode cipher suites.David Benjamin
These were added in TLS 1.2. They are like the standard AES-CBC cipher suites, but use different HMACs. Change-Id: Ib89ddebd1aa398b1347f8285f5d827068b1bd181 Reviewed-on: https://boringssl-review.googlesource.com/1730 Reviewed-by: Adam Langley <agl@google.com>
2014-09-04OPENSSL_EXPORT SSL_CTX_set_keylog_bio.David Benjamin
Forgot to do that. Change-Id: Ic7eb199c3acf4aa249be3f7a3312e8c2bc7a2372 Reviewed-on: https://boringssl-review.googlesource.com/1720 Reviewed-by: Adam Langley <agl@google.com>
2014-09-03Export pqueue functions.Adam Langley
04dbb7f1d185af0837d46ac76bf899df6cdd2cc5 added tests for the pqueue functions. However, when building as a shared library, the test binary needs access to the raw pqueue functions which require them to be exported. Change-Id: Iffb22fec491082ff43f06a7119560610425cf20e Reviewed-on: https://boringssl-review.googlesource.com/1711 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-09-03Prune some dead quirks and document the SSL_OP_ALL ones.David Benjamin
Update SSL_OP_ALL to account for SSL_OP_CRYPTOPRO_TLSEXT_BUG being gone, and update ssl3_setup_write_buffer to account for SSL_MODE_CBC_RECORD_SPLITTING rather than the now defunct SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS. Also remove SSL_OP_TLS_BLOCK_PADDING_BUG. This is to allow for a buggy peer which pads CBC with N bytes of value N rather than N+1 bytes of value N. This quirk has been broken since CBC padding checks became constant-time, as demonstrated by this attempt at a test. (Instead of just decrementing padding_length, it needs to also keep track of a separate padding_value and not decrement that one.) https://boringssl-review.googlesource.com/#/c/1690/ (The quirk would also fall over anyway if the buggy client ever did a session resumption; then the server speaks first rather than the client, and the quirk triggered on reading the first encrypted record from the peer.) Change-Id: I19942dc629a47832aead77a46bb50e0b0a9780b3 Reviewed-on: https://boringssl-review.googlesource.com/1694 Reviewed-by: Adam Langley <agl@google.com>
2014-09-03Add SSL_CTX_set_keylog_bio.David Benjamin
Configures the SSL stack to log session information to a BIO. The intent is to support NSS's SSLKEYLOGFILE environment variable. Add support for the same environment variable to tool/client.cc. Tested against Wireshark 1.12.0. BUG=393477 Change-Id: I4c231f9abebf194eb2df4aaeeafa337516774c95 Reviewed-on: https://boringssl-review.googlesource.com/1699 Reviewed-by: Adam Langley <agl@google.com>
2014-09-03Fix ARM build with OPENSSL_NO_ASM.Adam Langley
Change-Id: Id77fb7c904cbfe8172466dff20b6a715d90b806c Reviewed-on: https://boringssl-review.googlesource.com/1710 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Remove MD5, SHA-224, and SHA-512 handling from s3_cbc.c.David Benjamin
The only MD5 CBC-mode cipher suites are TLS_KRB5_WITH_DES_CBC_MD5, TLS_KRB5_WITH_3DES_EDE_CBC_MD5, and TLS_KRB5_WITH_IDEA_CBC_MD5. We do not support those, and it seems quite safe to assume that list will not grow. No current cipher suites use SHA-224 or SHA-512 MACs. We can restore those cases if that ever changes, but hopefully any future cipher suites we care about will be using the AEAD construction. Change-Id: I7f2d30238e2156a59b5fed1e48fabe6660fc9b67 Reviewed-on: https://boringssl-review.googlesource.com/1697 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Check the server did not use a TLS 1.2 cipher suite pre-TLS 1.2.David Benjamin
This check got refactored in OpenSSL 1.0.2 and broke in the process. Fix this and add a test. Otherwise things like client auth can get slightly confused; it will try to sign the MD5/SHA-1 hash, but the TLS 1.2 cipher suite may not use SSL_HANDSHAKE_MAC_DEFAULT, so those digests won't be available. Based on upstream's 226751ae4a1f3e00021c43399d7bb51a99c22c17. Change-Id: I5b864d3a696f3187b849c53b872c24fb7df27924 Reviewed-on: https://boringssl-review.googlesource.com/1696 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Fix the return values for most of SRTP.David Benjamin
Switch all of SRTP code to the standard return value convention with two exceptions. Unfortunately, OpenSSL exposed API with the wrong error code. Keep the public API flipped and document. Change-Id: I43ac82513f4f52bb36a0b54aba9b9e0fa285730e Reviewed-on: https://boringssl-review.googlesource.com/1691 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Add a test for SSL_OP_TLS_D5_BUG.David Benjamin
If this is part of SSL_OP_ALL, we should have a test for it. Change-Id: Ia72422beb2da6434726e78e174f3416f90f7c897 Reviewed-on: https://boringssl-review.googlesource.com/1695 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Fix doc.config for header files being moved.David Benjamin
Change-Id: I489d0f7be06ff4b5e185728a680f4d78e653113e Reviewed-on: https://boringssl-review.googlesource.com/1698 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Remove remnants of EVP_CIPHER-based AES_GCM cipher.David Benjamin
Those codepaths are never hit. Change-Id: Ib6908ebe90ab667774785298fdc3f96acc4b50df Reviewed-on: https://boringssl-review.googlesource.com/1693 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Don't export obj_dat.h.David Benjamin
This isn't a header file that makes sense to export; any compilation unit which includes it will gain a bunch of static arrays. Change-Id: Ic698b74bdf758506a53d4eba19ab8b0f49a11ef7 Reviewed-on: https://boringssl-review.googlesource.com/1692 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Fix minor issues found by Clang's analysis.Adam Langley
Thanks to Denis Denisov for running the analysis. Change-Id: I80810261e013423e746fd8d8afefb3581cffccc0 Reviewed-on: https://boringssl-review.googlesource.com/1701 Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Fix crash as server when resuming with SNI.Adam Langley
Thanks to Denis Denisov for noting that |host_name| could be used while uninitialised in the resumption case. While in the area, this change also renames |servername_done| to something more reasonable and removes a documented value that was never used. Additionally, the SNI ack was only sent when not resuming so calculating whether it should be sent when processing ClientHello extensions (which is after s->hit has been set) is superfluous. Lastly, since SNI is only acked by servers, there's no need to worry about the SNI callback returning NOACK in the client case. Change-Id: Ie4ecfc347bd7afaf93b12526ff9311cc45da4df6 Reviewed-on: https://boringssl-review.googlesource.com/1700 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-09-02Add tests for pqueueAlex Chernyakhovsky
Reorder the tests in all_tests.sh to be in alphabetical order. Change-Id: Idc6df6ab4a25709312a6f58635061bb643582c70 Reviewed-on: https://boringssl-review.googlesource.com/1680 Reviewed-by: Adam Langley <agl@google.com>
2014-08-29Merge third_party/boringssl/src from ↵Android Chromium Automerger
https://boringssl.googlesource.com/boringssl.git at 6c7aed048ca0a335e02dfee10976c5dc8620783e This commit was generated by merge_from_chromium.py. Change-Id: I1037c8ac24a2b7aa27eda32b636700230ebcb3ea
2014-08-29Client-side OCSP stapling support.David Benjamin
Remove the old implementation which was excessively general. This mirrors the SCT support and adds a single boolean flag to request an OCSP response with no responder IDs, extensions, or frills. The response, if received, is stored on the SSL_SESSION so that it is available for (re)validation on session resumption; Chromium revalidates the saved auth parameters on resume. Server support is unimplemented for now. This API will also need to be adjusted in the future if we implement RFC 6961. Change-Id: I533c029b7f7ea622d814d05f934fdace2da85cb1 Reviewed-on: https://boringssl-review.googlesource.com/1671 Reviewed-by: Adam Langley <agl@google.com>
2014-08-29Test client auth under TLS 1.2 hash mismatch and SSL 3.David Benjamin
Maintain a handshake buffer in prf.go to implement TLS 1.2 client auth. Also use it for SSL 3. This isn't strictly necessary as we know the hash functions, but Go's hash.Hash interface lacks a Copy method. Also fix the server-side tests which failed to test every TLS version. Change-Id: I98492c334fbb9f2f0f89ee9c5c8345cafc025600 Reviewed-on: https://boringssl-review.googlesource.com/1664 Reviewed-by: Adam Langley <agl@google.com>
2014-08-28Add CBS_ASN1_ENUMERATED to bytestring.h.David Benjamin
For parsing OCSP responses. Change-Id: I419bc60372d7927f2166bcd5bafa4147727e32ed Reviewed-on: https://boringssl-review.googlesource.com/1670 Reviewed-by: Adam Langley <agl@google.com>
2014-08-28Merge from Chromium at DEPS revision 291560Torne (Richard Coles)
This commit was generated by merge_to_master.py. Change-Id: Ie02412c219d8a2b0cce13107ec58189d28a0085b
2014-08-28Export CBS_get_any_asn1_element.David Benjamin
Useful for parsing things when you don't know what tag to expect (e.g. a CHOICE). Also allow its operands to be NULL, so that it can be used to skip arbitrary elements. Delete CBS_ASN1_ANY which wasn't doing anything. Change-Id: I56413e68b4f2e13860ea3e55373d5830713d7e5c Reviewed-on: https://boringssl-review.googlesource.com/1661 Reviewed-by: Adam Langley <agl@google.com>
2014-08-28Remove session_ctx macro.David Benjamin
Don't pollute the embedder's namespace with a session_ctx macro. It looks like the difference was that, without TLS extensions, session_ctx was ctx rather than initial_ctx. Now it's always initial_ctx. Retain the semantics of switching SSL_CTX's out after the fact, until/unless we decide to replace that with something less scary-sounding. Change-Id: Ie5df5138aec25218ca80031cf645671968b8a54a Reviewed-on: https://boringssl-review.googlesource.com/1663 Reviewed-by: Adam Langley <agl@google.com>