mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libseckey: Fix incorrect flag checking related to RSA X9.31
Use a bit-wise AND, not a logical AND to mask the flag out of the flags field. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
b1d44876bd
commit
cf51aa1421
@@ -708,7 +708,7 @@ static int sk_ep11_rsa_sign(const unsigned char *key_token,
|
||||
case RSA_X931_PADDING:
|
||||
mech.mechanism = CKM_RSA_X9_31;
|
||||
|
||||
if ((hdr->flags && PKEY_TYPE_EP11_FLAG_X9_31) == 0) {
|
||||
if ((hdr->flags & PKEY_TYPE_EP11_FLAG_X9_31) == 0) {
|
||||
sk_debug(debug, "ERROR: no RSA X9.31 key");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user