diff --git a/src/libstrongswan/credentials/containers/pkcs12.c b/src/libstrongswan/credentials/containers/pkcs12.c index 5e36b3cd40..d738910077 100644 --- a/src/libstrongswan/credentials/containers/pkcs12.c +++ b/src/libstrongswan/credentials/containers/pkcs12.c @@ -157,7 +157,7 @@ bool pkcs12_derive_key(hash_algorithm_t hash, chunk_t password, chunk_t salt, bool success; int i; - if (password.len) + if (password.ptr) { /* convert the password to UTF-16BE (without BOM) with 0 terminator */ unicode = chunk_alloca(password.len * 2 + 2); for (i = 0; i < password.len; i++)