aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/plugins
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-01-24 19:42:40 +0100
committerTobias Brunner <tobias@strongswan.org>2013-01-24 23:36:02 +0100
commit572a707765dc74bd781e26690cdf926adae015d2 (patch)
tree38711b73d2df71b62d5d8e0acc221c9830862d2d /src/libstrongswan/plugins
parent9ccfeb8ca133823eac1fe255e5ec9cb9606d6c62 (diff)
downloadstrongswan-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.c2
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);
}