This allows a caller to create a separated proposal for supported AEAD
algorithms, as required by RFC 5996.
return &this->public;
}
+/*
+ * Describtion in header-file
+ */
+proposal_t *proposal_create_default_aead(protocol_id_t protocol)
+{
+ private_proposal_t *this;
+
+ switch (protocol)
+ {
+ case PROTO_IKE:
+ this = (private_proposal_t*)proposal_create(protocol, 0);
+ proposal_add_supported_ike(this, TRUE);
+ return &this->public;
+ case PROTO_ESP:
+ /* we currently don't include any AEAD proposal for ESP, as we
+ * don't know if our kernel backend actually supports it. */
+ return NULL;
+ case PROTO_AH:
+ default:
+ return NULL;
+ }
+}
+
/*
* Describtion in header-file
*/
*/
proposal_t *proposal_create_default(protocol_id_t protocol);
+/**
+ * Create a default proposal for supported AEAD algorithms
+ *
+ * @param protocol protocol, such as PROTO_ESP
+ * @return proposal_t object, NULL if none supported
+ */
+proposal_t *proposal_create_default_aead(protocol_id_t protocol);
+
/**
* Create a proposal from a string identifying the algorithms.
*