diff options
author | Miloslav Trmač <mitr@redhat.com> | 2010-07-31 00:47:05 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2010-07-31 00:47:05 +0200 |
commit | 2156776fa587619559d9993879025c20677062ab (patch) | |
tree | 88ab6aa5393b8085dac1c8d723298cde7324881e | |
parent | af51c84e19753ec0c9de368816a30bcc4fb90c24 (diff) | |
parent | afed807b11199877214ec2e5d81e96c230237759 (diff) | |
download | cryptodev-linux-2156776fa587619559d9993879025c20677062ab.tar.gz cryptodev-linux-2156776fa587619559d9993879025c20677062ab.tar.xz cryptodev-linux-2156776fa587619559d9993879025c20677062ab.zip |
Merge branch 'algorithm-speedup'
-rw-r--r-- | ncr-pk.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |