padding: Pass the MGF1 information to the card driver for RSA-PSS mechanism

This commit is contained in:
Jakub Jelen 2021-01-18 11:36:21 +01:00 committed by Frank Morgner
parent edaf921eb6
commit 44d429c3ad
1 changed files with 2 additions and 0 deletions

View File

@ -491,6 +491,8 @@ int sc_get_encoding_flags(sc_context_t *ctx,
} else if ((caps & SC_ALGORITHM_RSA_PAD_PSS) &&
(iflags & SC_ALGORITHM_RSA_PAD_PSS)) {
*sflags |= SC_ALGORITHM_RSA_PAD_PSS;
*sflags |= iflags & SC_ALGORITHM_MGF1_HASHES;
*pflags = iflags & ~(iflags & (SC_ALGORITHM_MGF1_HASHES | SC_ALGORITHM_RSA_PAD_PSS));
} else if ((caps & SC_ALGORITHM_RSA_RAW) &&
(iflags & SC_ALGORITHM_RSA_PAD_PKCS1