Include CCM/GCM algorithms in IKEv2 proposals, if supported
authorMartin Willi <martin@revosec.ch>
Wed, 18 Aug 2010 18:32:57 +0000 (20:32 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 19 Aug 2010 17:05:05 +0000 (19:05 +0200)
src/libcharon/config/proposal.c

index 0dc29f5..fc603b5 100644 (file)
@@ -761,21 +761,22 @@ static void proposal_add_supported_ike(private_proposal_t *this)
                        case ENCR_AES_CTR:
                        case ENCR_CAMELLIA_CBC:
                        case ENCR_CAMELLIA_CTR:
-                               /* we assume that we support all AES sizes */
-                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 128);
-                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 192);
-                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 256);
-                               break;
-                       case ENCR_3DES:
-                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 0);
-                               break;
                        case ENCR_AES_CCM_ICV8:
                        case ENCR_AES_CCM_ICV12:
                        case ENCR_AES_CCM_ICV16:
                        case ENCR_AES_GCM_ICV8:
                        case ENCR_AES_GCM_ICV12:
                        case ENCR_AES_GCM_ICV16:
-                               /* not yet in IKE */
+                       case ENCR_CAMELLIA_CCM_ICV8:
+                       case ENCR_CAMELLIA_CCM_ICV12:
+                       case ENCR_CAMELLIA_CCM_ICV16:
+                               /* we assume that we support all AES/Camellia sizes */
+                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 128);
+                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 192);
+                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 256);
+                               break;
+                       case ENCR_3DES:
+                               add_algorithm(this, ENCRYPTION_ALGORITHM, encryption, 0);
                                break;
                        case ENCR_DES:
                                /* no, thanks */