]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - ssl/record/rec_layer_d1.c
Implement Maximum Fragment Length TLS extension.
[thirdparty/openssl.git] / ssl / record / rec_layer_d1.c
index 59285ed59186b2536d67a2f00d68844f7caa0397..3eabf71cf60e5fc7462a92ff722a33b9a3945e38 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2005-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -774,7 +774,7 @@ int do_dtls1_write(SSL *s, int type, const unsigned char *buf,
     if (len == 0 && !create_empty_fragment)
         return 0;
 
-    if (len > s->max_send_fragment) {
+    if (len > ssl_get_max_send_fragment(s)) {
         SSLerr(SSL_F_DO_DTLS1_WRITE, SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE);
         return 0;
     }