]> granicus.if.org Git - openssl/commitdiff
Fix CCM support in DTLS
authorDr. Stephen Henson <steve@openssl.org>
Wed, 26 Aug 2015 13:03:24 +0000 (14:03 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 2 Sep 2015 20:23:12 +0000 (21:23 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
ssl/d1_both.c

index 2c3ab5423b4391538c1b0bbf269bedd1bb3da074..d2f5defe14c61d379782e6b26295f56dbb5d830a 100644 (file)
@@ -270,7 +270,8 @@ int dtls1_do_write(SSL *s, int type)
 
     if (s->write_hash) {
         if (s->enc_write_ctx
-            && EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_GCM_MODE)
+            && ((EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_GCM_MODE) ||
+                (EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_CCM_MODE)))
             mac_size = 0;
         else
             mac_size = EVP_MD_CTX_size(s->write_hash);