padding: Pass the MGF1 information to the card driver for RSA-PSS mechanism
This commit is contained in:
parent
edaf921eb6
commit
44d429c3ad
|
@ -491,6 +491,8 @@ int sc_get_encoding_flags(sc_context_t *ctx,
|
||||||
} else if ((caps & SC_ALGORITHM_RSA_PAD_PSS) &&
|
} else if ((caps & SC_ALGORITHM_RSA_PAD_PSS) &&
|
||||||
(iflags & SC_ALGORITHM_RSA_PAD_PSS)) {
|
(iflags & SC_ALGORITHM_RSA_PAD_PSS)) {
|
||||||
*sflags |= 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) &&
|
} else if ((caps & SC_ALGORITHM_RSA_RAW) &&
|
||||||
(iflags & SC_ALGORITHM_RSA_PAD_PKCS1
|
(iflags & SC_ALGORITHM_RSA_PAD_PKCS1
|
||||||
|
|
Loading…
Reference in New Issue