diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-31 00:51:46 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-31 00:51:46 +0200 |
commit | 49d7012c4c62f6681378a56d9af4d721178b8ad3 (patch) | |
tree | f628266a0c07d747dea77fca8cc08a6ff30b912b /crypto/userspace/ncr-pk.c | |
parent | dbff0a8826b2dd9abc0c7699ae883a95d468b12c (diff) | |
parent | 3f11cfa0d94fcdc42db8812118e7386050660d6e (diff) | |
download | kernel-crypto-49d7012c4c62f6681378a56d9af4d721178b8ad3.tar.gz kernel-crypto-49d7012c4c62f6681378a56d9af4d721178b8ad3.tar.xz kernel-crypto-49d7012c4c62f6681378a56d9af4d721178b8ad3.zip |
Merge branch 'standalone-master' into standalone-rename
Diffstat (limited to 'crypto/userspace/ncr-pk.c')
-rw-r--r-- | crypto/userspace/ncr-pk.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/userspace/ncr-pk.c b/crypto/userspace/ncr-pk.c index e4529b30d7f..0a394a2b7a6 100644 --- a/crypto/userspace/ncr-pk.c +++ b/crypto/userspace/ncr-pk.c @@ -614,6 +614,10 @@ void * input, *output; switch(ctx->algorithm->algo) { case NCR_ALG_RSA: + if (ctx->sign_hash == NULL) { + err(); + return -EINVAL; + } cret = rsa_sign_hash_ex( input, isg_size, output, &osize, ctx->type, ctx->sign_hash, ctx->salt_len, &ctx->key->key.pk.rsa); if (cret != CRYPT_OK) { @@ -674,6 +678,10 @@ uint8_t* sig; switch(ctx->algorithm->algo) { case NCR_ALG_RSA: + if (ctx->sign_hash == NULL) { + err(); + return -EINVAL; + } cret = rsa_verify_hash_ex( sig, sign_sg_size, hash, hash_size, ctx->type, ctx->sign_hash, ctx->salt_len, &stat, &ctx->key->key.pk.rsa); |