<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">The Cisco ASA uses hardware-assist for IPSec/TLS/SSL/DTLS, and most of that work was done before DTLS was standardized. This is also the reason why Cisco ASA support for TLSv1.1/v1.2 is a long time coming. The Cisco ASA VPN team is very small, and they’ve lost people on the VPN team recently.<div class=""><br class=""></div><div class="">The Cisco ASA has recently updated to OpenSSL 1.0.1 (right before Heartbleed broke out), so it really depends on what version of the ASA code you are running.</div><div class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">--</div><div class="">-Todd Short</div><div class="">// <a href="mailto:tshort@akamai.com" class="">tshort@akamai.com</a></div><div class="">// “One if by land, two if by sea, three if by the Internet."</div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 17, 2015, at 4:48 PM, David Woodhouse via RT <<a href="mailto:rt@openssl.org" class="">rt@openssl.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Commit 9cf0f187 in HEAD, and 68039af3 in 1.0.2, removed a version check<br class="">from dtls1_buffer_message() which was needed to distinguish between DTLS<br class="">1.x and Cisco's pre-standard version of DTLS.<br class=""><br class="">$DEITY knows why Cisco haven't moved to the standard version of DTLS by<br class="">now. The RFC was published in 2006, and since you can tell the<br class="">difference on the wire it's *trivial* to have the server accept both and<br class="">upgrade the clients piecemeal. The ocserv server manages this.<br class=""><br class="">But it isn't our place to marvel at Cisco's incompetence (like the fact<br class="">that their DTLS implementation is still dropping out-of-order received<br class="">packets, 6½ years after I fixed RT#1752). Our place is to try to be<br class="">compatible with it. And this commit broke that, causing the OpenConnect<br class="">VPN client to abort:<br class=""><br class="">Connected vpntest0 as 192.168.1.13, using SSL<br class="">d1_both.c(1112): OpenSSL internal error, assertion failed: s->d1->w_msg_hdr.msg_len + DTLS1_CCS_HEADER_LENGTH == (unsigned int)s->init_num<br class="">Aborted (core dumped)<br class=""><br class="">---<br class="">The patch below fixes it. Tested in 1.0.2, but I haven't tested with<br class="">HEAD yet because I need to work out how to set up the DTLS session to be<br class="">"resumed" — none of this compiles any more...<br class=""><br class="">../dtls.c: In function 'start_dtls_handshake':<br class="">../dtls.c:141:24: error: dereferencing pointer to incomplete type<br class="">   vpninfo->dtls_session->ssl_version = 0x0100; /* DTLS1_BAD_VER */<br class="">                        ^<br class="">../dtls.c:145:23: error: dereferencing pointer to incomplete type<br class="">  vpninfo->dtls_session->master_key_length = sizeof(vpninfo->dtls_secret);<br class="">                       ^<br class="">../dtls.c:146:30: error: dereferencing pointer to incomplete type<br class="">  memcpy(vpninfo->dtls_session->master_key, vpninfo->dtls_secret,<br class="">                              ^<br class="">../dtls.c:149:23: error: dereferencing pointer to incomplete type<br class="">  vpninfo->dtls_session->session_id_length = sizeof(vpninfo->dtls_session_id);<br class="">                       ^<br class="">../dtls.c:150:30: error: dereferencing pointer to incomplete type<br class="">  memcpy(vpninfo->dtls_session->session_id, vpninfo->dtls_session_id,<br class="">                              ^<br class="">../dtls.c:170:23: error: dereferencing pointer to incomplete type<br class="">  vpninfo->dtls_session->cipher = dtls_cipher;<br class="">                       ^<br class="">../dtls.c:171:23: error: dereferencing pointer to incomplete type<br class="">  vpninfo->dtls_session->cipher_id = dtls_cipher->id;<br class="">                       ^<br class="">../dtls.c:171:48: error: dereferencing pointer to incomplete type<br class="">  vpninfo->dtls_session->cipher_id = dtls_cipher->id;<br class=""><br class="">diff --git a/ssl/d1_both.c b/ssl/d1_both.c<br class="">index 2553c3d..1116416 100644<br class="">--- a/ssl/d1_both.c<br class="">+++ b/ssl/d1_both.c<br class="">@@ -1108,8 +1108,9 @@ int dtls1_buffer_message(SSL *s, int is_ccs)<br class="">     memcpy(frag->fragment, s->init_buf->data, s->init_num);<br class=""><br class="">     if (is_ccs) {<br class="">+<span class="Apple-tab-span" style="white-space:pre"> </span>/* For DTLS_BAD_VER the header length is non-standard */<br class="">         OPENSSL_assert(s->d1->w_msg_hdr.msg_len +<br class="">-                       DTLS1_CCS_HEADER_LENGTH == (unsigned int)s->init_num);<br class="">+                       ((s->version==DTLS1_VERSION)?DTLS1_CCS_HEADER_LENGTH:3) == (unsigned int)s->init_num);<br class="">     } else {<br class="">         OPENSSL_assert(s->d1->w_msg_hdr.msg_len +<br class="">                        DTLS1_HM_HEADER_LENGTH == (unsigned int)s->init_num);<br class=""><br class=""><br class="">-- <br class="">dwmw2<br class=""><br class=""><span id="cid:2C6D018A-95A1-4818-B79D-BE0F1E182282"><smime.p7s></span>_______________________________________________<br class="">openssl-dev mailing list<br class="">To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-dev" class="">https://mta.openssl.org/mailman/listinfo/openssl-dev</a><br class=""></div></blockquote></div><br class=""></div></body></html>