Re: [PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
Kees Cook wrote: > > + memcpy(, prep->data + ctx->sig_offset, 8); > > Instead of the literal 8, sizeof(wrapper)? Reasonable. It was originally an array of bytes until I found out that it had structure. Even so, I should probably have used sizeof() then. > > + if

Re: [PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread Kees Cook
On Tue, Oct 30, 2012 at 12:21 PM, David Howells wrote: > The certificate data block in a PE binary has a wrapper around the PKCS#7 > signature we actually want to get at. Strip this off and check that we've got > something that appears to be a PKCS#7 signature. > > Signed-off-by: David Howells

[PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
The certificate data block in a PE binary has a wrapper around the PKCS#7 signature we actually want to get at. Strip this off and check that we've got something that appears to be a PKCS#7 signature. Signed-off-by: David Howells --- crypto/asymmetric_keys/pefile_parser.c | 60

[PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
The certificate data block in a PE binary has a wrapper around the PKCS#7 signature we actually want to get at. Strip this off and check that we've got something that appears to be a PKCS#7 signature. Signed-off-by: David Howells dhowe...@redhat.com --- crypto/asymmetric_keys/pefile_parser.c |

Re: [PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread Kees Cook
On Tue, Oct 30, 2012 at 12:21 PM, David Howells dhowe...@redhat.com wrote: The certificate data block in a PE binary has a wrapper around the PKCS#7 signature we actually want to get at. Strip this off and check that we've got something that appears to be a PKCS#7 signature. Signed-off-by:

Re: [PATCH 17/23] pefile: Strip the wrapper off of the cert data block

2012-10-30 Thread David Howells
Kees Cook keesc...@chromium.org wrote: + memcpy(wrapper, prep-data + ctx-sig_offset, 8); Instead of the literal 8, sizeof(wrapper)? Reasonable. It was originally an array of bytes until I found out that it had structure. Even so, I should probably have used sizeof() then. +