[strongSwan-dev] [PATCH 2/2] ikev1 support for PKCS#7 wrapped certificates

Martin Willi martin at strongswan.org
Fri Jan 11 10:41:28 CET 2013


> ikev1 support for PKCS#7 wrapped certificates.

Great, looks fine, applied to master.

To keep the code clean (and avoid variable overloading), I have
refactored the IKEv1/IKEv2 certificate processing to several functions.

> +	container = cert_payload->get_container(cert_payload);
> +	if (container)
> +	{
> +		pkcs7_t *pkcs7;
> +		enumerator_t *enumerator;
> +
> +		pkcs7 = (pkcs7_t *)container;

While it isn't necessary in this case, it is good practice to check the
container type before casting it to pkcs7_t. I have added such a check
during refactoring.

Many thanks for the patch!

Best regards
Martin





More information about the Dev mailing list