Fix: no copying done from in to out in case of SC_ALGORITHM_RSA_PAD_NONE padding (by Chaskiel)

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1692 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-12-23 10:48:29 +00:00
parent 3dbb26ad6a
commit f017da5102

View File

@ -225,6 +225,7 @@ int sc_pkcs1_encode(struct sc_context *ctx, unsigned long flags,
switch(pad_algo) {
case SC_ALGORITHM_RSA_PAD_NONE:
/* padding done by card => nothing to do */
memcpy(out, tmp, tmp_len);
*out_len = tmp_len;
return SC_SUCCESS;
case SC_ALGORITHM_RSA_PAD_PKCS1: