Use modified encryption payload to encrypt/decrypt complete IKEv1 messages.
[strongswan.git] / src / libcharon / encoding / payloads / payload.c
index 9dc2677..2f22503 100644 (file)
@@ -220,7 +220,8 @@ payload_t *payload_create(payload_type_t type)
                case EXTENSIBLE_AUTHENTICATION:
                        return (payload_t*)eap_payload_create();
                case ENCRYPTED:
-                       return (payload_t*)encryption_payload_create();
+               case ENCRYPTED_V1:
+                       return (payload_t*)encryption_payload_create(type);
                default:
                        return (payload_t*)unknown_payload_create(type);
        }