aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2014-12-16Fix EVP_Cipher error-handling.David Benjamin1-4/+14
Turns out the EVP_CIPH_FLAG_CUSTOM_CIPHER ciphers (i.e. legacy EVP_CIPHER AES-GCM) have a completely different return value setup than the normal ones which are the standard one/zero. (Except that they never return zero; see TODO.) Fix checks in ssl/ and remove remnants of EVP_CIPH_FLAG_CUSTOM_CIPHER in ssl/ as we're using EVP_AEAD now. See CHANGES entry added in upstream's 3da0ca796cae6625bd26418afe0a1dc47bf5a77f. Change-Id: Ia4d0ff59b03c35fab3a08141c60b9534cb7172e2 Reviewed-on: https://boringssl-review.googlesource.com/2606 Reviewed-by: Adam Langley <agl@google.com>
2014-12-16Add outgoing messages to the handshake hash at set_handshake_header.David Benjamin1-1/+0
This avoids needing a should_add_to_finished_hash boolean on do_write. The logic in do_write was a little awkward because do_write would be called multiple times if the write took several iterations. This also gets complex if DTLS retransmits are involved. (At a glance, it's not obvious the BIO_CTRL_DGRAM_MTU_EXCEEDED case actually works.) Doing it as the handshake message is being prepared avoids this concern. It also gives a natural point for the extended master secret logic which needs to do work after the finished hash has been sampled. As a bonus, we can remove s->d1->retransmitting which was only used to deal with this issue. Change-Id: Ifedf23ee4a6c5e08f960d296a6eb1f337a16dc7a Reviewed-on: https://boringssl-review.googlesource.com/2604 Reviewed-by: Adam Langley <agl@google.com>
2014-12-13Merge SSLv23_method and DTLS_ANY_VERSION.David Benjamin2-71/+44
This makes SSLv23_method go through DTLS_ANY_VERSION's version negotiation logic. This allows us to get rid of duplicate ClientHello logic. For compatibility, SSL_METHOD is now split into SSL_PROTOCOL_METHOD and a version. The legacy version-locked methods set min_version and max_version based this version field to emulate the original semantics. As a bonus, we can now handle fragmented ClientHello versions now. Because SSLv23_method is a silly name, deprecate that too and introduce TLS_method. Change-Id: I8b3df2b427ae34c44ecf972f466ad64dc3dbb171
2014-12-13Implement the V2ClientHello sniff in version-locked methods.David Benjamin2-0/+11
Tested manually by replacing SSLv23_method() with TLSv1_2_method() in bssl_shim. This is a large chunk of code which is not run in SSLv23_method(), but it will be run after unification. It's split out separately to ease review. Change-Id: I6bd241daca17aa0f9b3e36e51864a29755a41097
2014-12-13Add min_version and max_version APIs.David Benjamin1-0/+36
Amend the version negotiation tests to test this new spelling of max_version. min_version will be tested in a follow-up. Change-Id: Ic4bfcd43bc4e5f951140966f64bb5fd3e2472b01 Reviewed-on: https://boringssl-review.googlesource.com/2583 Reviewed-by: Adam Langley <agl@google.com>
2014-12-13Pull SSL3_ENC_METHOD out of SSL_METHOD.David Benjamin1-2/+10
SSL3_ENC_METHOD will remain version-specific while SSL_METHOD will become protocol-specific. This finally removes all the version-specific portions of SSL_METHOD but the version tag itself. (SSL3_ENC_METHOD's version-specific bits themselves can probably be handled by tracking a canonicalized protocol version. It would simplify version comparisons anyway. The one catch is SSLv3 has a very different table. But that's a cleanup for future. Then again, perhaps a version-specific method table swap somewhere will be useful later for TLS 1.3.) Much of this commit was generated with sed invocation: s/method->ssl3_enc/enc_method/g Change-Id: I2b192507876aadd4f9310240687e562e56e6c0b1 Reviewed-on: https://boringssl-review.googlesource.com/2581 Reviewed-by: Adam Langley <agl@google.com>
2014-12-13Remove SSL_CTX_set_ssl_version.David Benjamin1-3/+0
Missed this one. It requires that we be able to change an SSL_METHOD after the after, which complicates compiling the version locking into min_version / max_version configurations. Change-Id: I24ba54b7939360bbfafe3feb355a65840bda7611 Reviewed-on: https://boringssl-review.googlesource.com/2579 Reviewed-by: Adam Langley <agl@google.com>
2014-12-13Remove redundant SSL_ST_BEFORE-related checks.David Benjamin1-1/+7
SSL_ST_BEFORE isn't a possible state anymore. It seems this state meant the side wasn't known, back in the early SSLeay days. Now upstream guesses (sometimes incorrectly with generic methods), and we don't initialize until later. SSL_shutdown also doesn't bother to call ssl3_shutdown at all if the side isn't initialized and SSL_ST_BEFORE isn't the uninitialized state, which seems a much more sensible arrangement. Likewise, because bare SSL_ST_BEFOREs no longer exist, SSL_in_init implies SSL_in_before and there is no need to check both. Change-Id: Ie680838b2f860b895073dabb4d759996e21c2824 Reviewed-on: https://boringssl-review.googlesource.com/2564 Reviewed-by: Adam Langley <agl@google.com>
2014-12-13Mark SSL3_ENC_METHODs const and remove an unused one.David Benjamin1-1/+2
There's an undefined one not used anywhere. The others ought to be const. Also move the forward declaration to ssl.h so we don't have to use the struct name. Change-Id: I76684cf65255535c677ec19154cac74317c289ba Reviewed-on: https://boringssl-review.googlesource.com/2561 Reviewed-by: Adam Langley <agl@google.com>
2014-12-09Remove EC_GROUP_set_point_conversion_formHåvard Molland1-5/+0
All serialization functions take point format as input, and asn1_form is never used. Change-Id: Ib1ede692e815ac0c929e3b589c3a5869adb0dc8b Reviewed-on: https://boringssl-review.googlesource.com/2511 Reviewed-by: Adam Langley <agl@google.com>
2014-12-08Remove ec hybrid point formatHåvard Molland1-4/+1
According to rfc5480 and rfc4492 the hybrid format is not allowed neither in certificates or the tls protocol. Change-Id: I1d3fb5bef765bc7b58d29bdd60e15247fac4dc7a Reviewed-on: https://boringssl-review.googlesource.com/2510 Reviewed-by: Adam Langley <agl@google.com>
2014-12-05Update references to RFCs.David Benjamin2-14/+5
Some code predated the RFCs themselves, but the RFCs now exist. Also remove now obsolete comments and some unused #defines. See upstream's cffeacd91e70712c99c431bf32a655fa1b561482. (Though this predates it; I just remembered I never uploaded it.) Change-Id: I5e56f0ab6b7f558820f72e84dfdbc71a8c23cb91 Reviewed-on: https://boringssl-review.googlesource.com/2475 Reviewed-by: Adam Langley <agl@google.com>
2014-12-04ClientHello Padding for Fast Radio Opening in 3G.Feng Lu1-0/+11
The ClientHello record is padded to 1024 bytes when fastradio_padding is enabled. As a result, the 3G cellular radio is fast forwarded to DCH (high data rate) state. This mechanism leads to a substantial redunction in terms of TLS handshake latency, and benefits mobile apps that are running on top of TLS. Change-Id: I3d55197b6d601761c94c0f22871774b5a3dad614
2014-12-04Renegerate OID outputs.David Benjamin1-16/+13
The files should round-trip now. This corrects some discrepancies between obj_mac.h and obj_mac.num which were also present in upstream. There seems to be a mismerge in upstream's eebd5e5dd7dff58297ea52e1c21df8fccd593965. (The discrepancy is harmless; those OIDs are not in obj_xref.txt.) Change-Id: I1f6cda016533ec3182750310f9936f7e072b54a0 Reviewed-on: https://boringssl-review.googlesource.com/2474 Reviewed-by: Adam Langley <agl@google.com>
2014-12-04Remove SSL_set_debug.David Benjamin1-4/+0
It just inserts extra flushes everywhere and isn't used. Change-Id: I082e4bada405611f4986ba852dd5575265854036 Reviewed-on: https://boringssl-review.googlesource.com/2456 Reviewed-by: Adam Langley <agl@google.com>
2014-12-04Remove some unimplemented prototypes.David Benjamin1-20/+0
Change-Id: Ib9cb54ef11cebb6e8e0b77d6d02c4c6acd7d03db Reviewed-on: https://boringssl-review.googlesource.com/2455 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Add EVP_md5_sha1.David Benjamin1-0/+4
Use it in ssl3_cert_verify_hash so signing a pre-TLS-1.2 handshake hash can go through RSA_sign and be intercepted via RSA_METHOD appropriately. This avoids Windows needing to intercept sign_raw. (CAPI keys cannot provide sign_raw, unless the input size happens to be that of NID_md5_sha1.) Also use it in processing ServerKeyExchange to avoid special-casing RSA. BUG=crbug.com/437023 Change-Id: Ia07433f468b75fdf7bfc8fa90c9751639b2478e6 Reviewed-on: https://boringssl-review.googlesource.com/2420 Reviewed-by: David Benjamin <davidben@google.com>
2014-12-02Replace s->first_packet with a s->s3->have_version bit.David Benjamin2-1/+4
first_packet is a temporary connection-global flag set for the duration of some call and then queried from other code. This kind of logic is too difficult to reason through. It also incorrectly treats renegotiate ClientHellos as pre-version-negotiation records. This eliminates the need to query enc_write_ctx (which wasn't EVP_AEAD-aware anyway). Instead, take a leaf from Go TLS's book and add a have_version bit. This is placed on s->s3 as it is connection state; s->s3 automatically gets reset on SSL_clear while s doesn't. This new flag will also be used to determine whether to do the V2ClientHello sniff when the version-locked methods merge into SSLv23_method. It will also replace needing to condition s->method against a dummy DTLS_ANY_VERSION value to determine whether DTLS version negotiation has happened yet. Change-Id: I5c8bc6258b182ba4ab175a48a84eab6d3a001333 Reviewed-on: https://boringssl-review.googlesource.com/2442 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Don't set s->state and s->server before the side is known.David Benjamin1-1/+5
If SSL_clear is called before SSL_set_{connect,accept}_state (as SSL_new does internally), s->state will get set prematurely. Likewise, s->server is set based on the method's ssl_accept hook, but client SSL's may be initialized from a generic SSL_METHOD too. Since we can't easily get rid of the generic SSL_METHODs, defer s->state and s->server initialization until the side is known. Change-Id: I0972e17083df22a3c09f6f087011b54c699a22e7 Reviewed-on: https://boringssl-review.googlesource.com/2439 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Remove s->type from SSL.David Benjamin1-1/+0
It's redundant with s->server. Change-Id: Idb4ca44618477b54f3be5f0630f0295f0708b0f4 Reviewed-on: https://boringssl-review.googlesource.com/2438 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Remove SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS.David Benjamin1-1/+0
It's unused. Also per the previous commit message, it historically had a bug anyway. Change-Id: I5868641e7938ddebbc0ffd72d218c81cd17c7739 Reviewed-on: https://boringssl-review.googlesource.com/2437 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Don't assign handshake_func in the handshake functions.David Benjamin1-0/+2
It should already be assigned, as of upstream's b31b04d951e9b65bde29657e1ae057b76f0f0a73. I believe these assignments are part of the reason it used to appear to work. Replace them with assertions. So the assertions are actually valid, check in SSL_connect / SSL_accept that they are never called if the socket had been placed in the opposite state. (Or we'd be in another place where it would have appeared to work with the handshake functions fixing things afterwards.) Now the only places handshake_func is set are in SSL_set_{connect,accept}_state and the method switches. Change-Id: Ib249212bf4aa889b94c35965a62ca06bdbcf52e1 Reviewed-on: https://boringssl-review.googlesource.com/2432 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Remove SSL_(CTX_)get_ssl_method.David Benjamin1-6/+0
We intend to deprecate the version-locked methods and unify them. Don't expose that there's a method swap. (The existing version-locked methods will merely be a shorthand for configuring minimum/maximum versions.) There is one consumer of SSL_get_ssl_method in internal code, but it's just some logging in test-only code. All it's doing is getting the version as a string which should be SSL_get_version instead. While here, also remove dead ssl_bad_method function. Also the bogus ssl_crock_st forward-declaration. The forward declaration in base.h should be perfectly sufficient. Change-Id: I50480808f51022e05b078a285f58ec85d5ad7c8e Reviewed-on: https://boringssl-review.googlesource.com/2408 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Recover SSL_OP_CIPHER_SERVER_PREFERENCE documentation.David Benjamin1-2/+2
b9cc33a4d6d935f71c3e70af9718e716b00712e8 deleted its documentation rather than SSL_OP_EPHEMERAL_RSA's. Change-Id: I2e099a2dc498f145c5a3ccaac824edbda27f7e89 Reviewed-on: https://boringssl-review.googlesource.com/2407 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Make it clear that SSL_OP_NO_DTLS* are the same as the TLS ones.David Benjamin1-2/+2
They're mapped to the same value, which is the only reason the tests work right now. Change-Id: I22f6e3a6b3a2c88b0f92b6d261e86111b4172cd6 Reviewed-on: https://boringssl-review.googlesource.com/2406 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02unifdef OPENSSL_NO_BIO.David Benjamin4-33/+1
Get that out of the way. Change-Id: Ia61f47f1e23595a1d4876a85ae7518f11f4ab6a0 Reviewed-on: https://boringssl-review.googlesource.com/2401 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Remove dead SSL BIO prototypes.David Benjamin1-9/+0
Those aren't implemented. Change-Id: If4229f9cd2a8d333678a9cb35c4e857068794c49 Reviewed-on: https://boringssl-review.googlesource.com/2400 Reviewed-by: Adam Langley <agl@google.com>
2014-12-02Remove method swap in SSL_set_session.David Benjamin1-2/+0
This is a bit of cleanup that probably should have been done at the same time as 30ddb434bfb845356fbacb6b2bd51f8814c7043c. For now, version negotiation is implemented with a method swap. It also performs this swap on SSL_set_session, but this was neutered in 30ddb434bfb845356fbacb6b2bd51f8814c7043c. Rather than hackishly neuter it, remove it outright. In addition, remove SSL_set_ssl_method. Now all method swaps are internal: SSLv23_method switch to a version-specific method and SSL_clear undoing it. Note that this does change behavior: if an SSL* is created with one version-specific method and we SSL_set_session to a session from a /different/ version, we would switch to the /other/ version-specific method. This is extremely confusing, so it's unlikely anyone was actually expecting it. Version-specific methods in general don't work well. Change-Id: I72a5c1f321ca9aeb1b52ebe0317072950ba25092 Reviewed-on: https://boringssl-review.googlesource.com/2390 Reviewed-by: Adam Langley <agl@google.com>
2014-12-01Make OCSP response and SCT list getter const-correct.David Benjamin1-2/+4
The data is owned by the SSL_SESSION, so the caller should not modify it. This will require changes in Chromium, but they should be trivial. Change-Id: I314718530c7d810f7c7b8852339b782b4c2dace1 Reviewed-on: https://boringssl-review.googlesource.com/2409 Reviewed-by: Adam Langley <agl@google.com>
2014-11-24Cleanup of setting external bufferHåvard Molland1-8/+5
Don't use |BIO_set_foo_buffer_size| when setting the sizes of the buffers while making buffer pair. Since it happens in pair.c we know the BIOs are BIO pairs and using bio_ctrl here complicates setting external buffers. Also zero out bio_bio_st during construction. This fixes a problem that would happen if the default buffer sizes were not set, since buf_externally_allocated was not yet initialized. Remove BIO_C_SET_BUFF_SIZE and BIO_CTRL_RESET which are not used for bio pairs. Change-Id: I365091d5f44f6f1c5522c325a771bdf03d8fe950 Reviewed-on: https://boringssl-review.googlesource.com/2370 Reviewed-by: Adam Langley <agl@google.com>
2014-11-21Remove SSL_set_session_secret_cb (EAP-FAST)David Benjamin2-31/+0
This is only used for EAP-FAST which we apparently don't need to support. Remove it outright. We broke it in 9eaeef81fa2d4fd6246dc02b6203fa936a5eaf67 by failing to account for session misses. If this changes and we need it later, we can resurrect it. Preferably implemented differently: the current implementation is bolted badly onto the handshake. Ideally use the supplied callbacks to fabricate an appropriate SSL_SESSION and resume that with as much of the normal session ticket flow as possible. The one difference is that EAP-FAST seems to require the probing mechanism for session tickets rather than the sane session ID echoing version. We can reimplement that by asking the record layer to probe ahead for one byte. Change-Id: I38304953cc36b2020611556a91e8ac091691edac Reviewed-on: https://boringssl-review.googlesource.com/2360 Reviewed-by: Adam Langley <agl@google.com>
2014-11-19Add malloc failure tests.Adam Langley1-0/+1
This commit fixes a number of crashes caused by malloc failures. They were found using the -malloc-test=0 option to runner.go which runs tests many times, causing a different allocation call to fail in each case. (This test only works on Linux and only looks for crashes caused by allocation failures, not memory leaks or other errors.) This is not the complete set of crashes! More can be found by collecting core dumps from running with -malloc-test=0. Change-Id: Ia61d19f51e373bccb7bc604642c51e043a74bd83 Reviewed-on: https://boringssl-review.googlesource.com/2320 Reviewed-by: Adam Langley <agl@google.com>
2014-11-18Remove SSL_check_chain and unexport CERT_PKEY flags.David Benjamin2-22/+0
Both of these are newly-exported in OpenSSL 1.0.2, so they cannot be used by current consumers. This was added in upstream's 18d7158809c9722f4c6d2a8af7513577274f9b56 to support custom selection of certificates. The intent seems to be that you listen to cert_cb and use SSL_check_chain to lean on OpenSSL to process signature algorithms list for you. Unfortunately, the implementation is slightly suspect: it uses the same function as the codepath which mutates and refers to the CERT_PKEY of the matching type. Some access was guarded by check_flags, but this is too complex. Part of it is also because the matching digest is selected early and we intend to connect this to EVP_PKEY_supports_digest so it is no longer a property of just the key type. Let's remove the hook for now, to unblock removing a lot of complexity. After cleaning up this area, a function like this could be cleaner to support, but we already have a version of this: select_certificate_cb and ssl_early_callback_ctx. Change-Id: I3add425b3996e5e32d4a88e14cc607b4fdaa5aec Reviewed-on: https://boringssl-review.googlesource.com/2283 Reviewed-by: Adam Langley <agl@google.com>
2014-11-18Remove CERT_PKEY_EXPLICIT_SIGN flag.David Benjamin1-2/+0
This is maintained just to distinguish whether the digest was negotiated or we simply fell back to assuming SHA-1 support. No code is sensitive to this flag and it adds complexity because it is set at a different time, for now, from the rest of valid_flags. The flag is new in OpenSSL 1.0.2, so nothing external could be sensitive to it. Change-Id: I9304e358d56f44d912d78beabf14316d456bf389 Reviewed-on: https://boringssl-review.googlesource.com/2282 Reviewed-by: Adam Langley <agl@google.com>
2014-11-18Remove SSL_get_peer_signature_nid and don't compute digests for peer_key.David Benjamin1-4/+0
This is new in OpenSSL 1.0.2 so it isn't used anywhere. Cuts down slightly on connection-global state associated with signature algorithm processing. Repurposing the digest field to mean both "the digest we choose to sign with this key" and "the digest the last signature we saw happened to use" is confusing. Change-Id: Iec4d5078c33e271c8c7b0ab221c356ee8480b89d Reviewed-on: https://boringssl-review.googlesource.com/2281 Reviewed-by: Adam Langley <agl@google.com>
2014-11-18Add EVP_PKEY_supports_digest.David Benjamin2-1/+15
This is intended for TLS client auth with Windows CAPI- and CNG-backed keys which implement sign over sign_raw and do not support all hash functions. Only plumbed through RSA for now. Change-Id: Ica42e7fb026840f817a169da9372dda226f7d6fd Reviewed-on: https://boringssl-review.googlesource.com/2250 Reviewed-by: Adam Langley <agl@google.com>
2014-11-18Add zero copy read and write api for bio pairs.Håvard Molland1-0/+73
Also add functionality for setting external buffers to give the caller better control of the buffers. This is typical needed if OS sockets can outlive the bio pair. Change-Id: I500f0c522011ce76e9a9bce5d7b43c93d9d11457
2014-11-17Remove some remnants of SSLv2.David Benjamin1-3/+1
Change-Id: Id294821162c4c9ea6f2fce2a0be65bafcb616068 Reviewed-on: https://boringssl-review.googlesource.com/2311 Reviewed-by: Adam Langley <agl@google.com>
2014-11-13Remove support for processing fragmented alertsAlex Chernyakhovsky2-3/+2
Prior to this change, BoringSSL maintained a 2-byte buffer for alerts, and would support reassembly of fragmented alerts. NSS does not support fragmented alerts, nor would any reasonable implementation produce them. Remove fragmented alert handling and produce an error if a fragmented alert has ever been encountered. Change-Id: I31530ac372e8a90b47cf89404630c1c207cfb048 Reviewed-on: https://boringssl-review.googlesource.com/2125 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Remove psk_identity_hint from SSL_SESSION.David Benjamin2-4/+10
There's not much point in retaining the identity hint in the SSL_SESSION. This avoids the complexity around setting psk_identity hint on either the SSL or the SSL_SESSION. Introduce a peer_psk_identity_hint for the client to store the one received from the server. This changes the semantics of SSL_get_psk_identity_hint; it now only returns the value configured for the server. The client learns the hint through the callback. This is compatible with the one use of this API in conscrypt (it pulls the hint back out to pass to a callback). Change-Id: I6d9131636b47f13ac5800b4451436a057021054a Reviewed-on: https://boringssl-review.googlesource.com/2213 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Remove SSL3_FLAGS_POP_BUFFER.David Benjamin1-2/+0
This is an experimental flag that dates back to SSLeay 0.8.1b or earlier. It's never set internally and never set in consumers. Change-Id: I922583635c9f3d8d93f08f1707531ad22a26ae6a Reviewed-on: https://boringssl-review.googlesource.com/2214 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Compare r and s sizes to the order, not the degree.David Benjamin1-2/+2
r and s are scalars, not EC coordinates. Change-Id: I46a20215d3c602559c18c74a1da9a91543ea73ca Reviewed-on: https://boringssl-review.googlesource.com/2240 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Keep retransmit window size architecture-independent.David Benjamin1-5/+6
Parameters like these should not change between 32-bit and 64-bit. 64 is also the value recommended in RFC 6347, section 4.1.2.6. Document those fields while I'm here. Change-Id: I8481ee0765ff3d261a96a2e1a53b6ad6695b2d42 Reviewed-on: https://boringssl-review.googlesource.com/2222 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Remove DTLSv1_listen.David Benjamin2-6/+0
This was added in http://rt.openssl.org/Ticket/Display.html?id=2033 to support a mode where a DTLS socket would statelessly perform the ClientHello / HelloVerifyRequest portion of the handshake, to be handed off to a socket specific to this peer address. This is not used by WebRTC or other current consumers. If we need to support something like this, it would be cleaner to do the listen portion (cookieless ClientHello + HelloVerifyRequest) externally and then spin up an SSL instance on receipt of a cookied ClientHello. This would require a slightly more complex BIO to replay the second ClientHello but would avoid peppering the DTLS handshake state with a special short-circuiting mode. Change-Id: I7a413932edfb62f8b9368912a9a0621d4155f1aa Reviewed-on: https://boringssl-review.googlesource.com/2220 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Remove i2d_X509_PKEY and d2i_X509_PKEY.David Benjamin1-2/+0
One of them was never implemented upstream or downstream. The other no longer works in BoringSSL. They're not used within BoringSSL (this still compiles), even in X509_INFO, and do not appear to be used by consumers. If they were, we would like to know via a compile failure. This removes the last consumer within BoringSSL of the ASN.1 parsing macros. Change-Id: Ifb72b1fcd0a4f7b3e6b081486f8638110872334b Reviewed-on: https://boringssl-review.googlesource.com/2203 Reviewed-by: Adam Langley <agl@google.com>
2014-11-10Remove pkey_ctrl.Adam Langley1-11/+0
It only included ASN1_PKEY_CTRL_DEFAULT_MD_NID and that's unused in BoringSSL. Change-Id: Idfcbd0f26f6448ce307c53ddef334f2e63c85a64
2014-11-06Add digest_test with tests for all existing EVP_MDs.David Benjamin2-5/+1
Remove the existing md5_test and sha1_test. They now are all covered by digest_test. For good measure, test the one-shot functions too. Change-Id: I8e144cc563fb8817144e26cbd2e10c15642464ba Reviewed-on: https://boringssl-review.googlesource.com/2211 Reviewed-by: Adam Langley <agl@google.com>
2014-11-04Make SSL_MODE_AUTO_RETRY the default.Adam Langley1-3/+4
Without SSL_MODE_AUTO_RETRY, even blocking mode will return SSL_ERROR_WANT_{READ|WRITE} in the event of a renegotiation. The comments in the code speak only of "nasty problems" unless this is done. The original commit that added SSL_MODE_AUTO_RETRY (54f10e6adce56eb2e59936e32216162aadc5d050) gives a little more detail: The [...] behaviour is needed by applications such as s_client and s_server that use select() to determine when to use SSL_read. Without the -nbio flag, s_client will use select() to find when the socket is readable and then call SSL_read with a blocking socket. However, this will still block in the event of an incomplete record, so the delay is already unbounded. This it's very unclear what the point of this behaviour ever was. Perhaps if the read and write paths were different sockets where the read socket was non-blocking but the write socket was blocking. But that seems like an implausible situation to worry too much about. Change-Id: I9d9f2526afc2e0fd0e5440e9a047f419a2d61afa Reviewed-on: https://boringssl-review.googlesource.com/2140 Reviewed-by: Adam Langley <agl@google.com>
2014-11-04DTLS1_AD_MISSING_HANDSHAKE_MESSAGE does not exist.David Benjamin1-9/+0
This code isn't compiled in. It seems there was some half-baked logic for a 7-byte alert that includes more information about handshake messages retransmit. No such alert exists, and the code had a FIXME anyway. If it gets resurrected in DTLS 1.3 or some extension, we can deal with it then. Change-Id: I8784ea8ee44bb8da4b0fe5d5d507997526557432 Reviewed-on: https://boringssl-review.googlesource.com/2121 Reviewed-by: Adam Langley <agl@google.com>
2014-10-31Remove ERR_LIB_PKCS12.Adam Langley1-2/+0
This is no longer used but, by retaining it, we might miss cases where code is still testing against it. Change-Id: I40ed47e41f903aaf2c5e5354d4348f8890021382 Reviewed-on: https://boringssl-review.googlesource.com/2110 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>