diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-01-24 19:42:40 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-01-24 23:36:02 +0100 |
commit | 572a707765dc74bd781e26690cdf926adae015d2 (patch) | |
tree | 38711b73d2df71b62d5d8e0acc221c9830862d2d /src/libstrongswan/plugins | |
parent | 9ccfeb8ca133823eac1fe255e5ec9cb9606d6c62 (diff) | |
download | strongswan-572a707765dc74bd781e26690cdf926adae015d2.tar.bz2 strongswan-572a707765dc74bd781e26690cdf926adae015d2.tar.xz |
Properly check MSB in openssl plugin's PKCS#7 implementation
Diffstat (limited to 'src/libstrongswan/plugins')
-rw-r--r-- | src/libstrongswan/plugins/openssl/openssl_pkcs7.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/openssl/openssl_pkcs7.c b/src/libstrongswan/plugins/openssl/openssl_pkcs7.c index 663397e59..ccc426235 100644 --- a/src/libstrongswan/plugins/openssl/openssl_pkcs7.c +++ b/src/libstrongswan/plugins/openssl/openssl_pkcs7.c @@ -615,7 +615,7 @@ static bool decrypt(private_openssl_pkcs7_t *this, continue; } chunk = openssl_asn1_str2chunk(sn); - if (chunk.len && chunk.ptr[0] | 0x80) + if (chunk.len && chunk.ptr[0] & 0x80) { /* if MSB is set, append a zero to make it non-negative */ chunk = chunk_cata("cc", chunk_from_thing(zero), chunk); } |