oops, define tmplen at start of block.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3227 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
a577a25813
commit
c1130f7f93
|
@ -151,11 +151,11 @@ int sc_pkcs15_compute_signature(struct sc_pkcs15_card *p15card,
|
||||||
|
|
||||||
/* some strange cards/setups need decrypt to sign ... */
|
/* some strange cards/setups need decrypt to sign ... */
|
||||||
if (p15card->flags & SC_PKCS15_CARD_FLAG_SIGN_WITH_DECRYPT) {
|
if (p15card->flags & SC_PKCS15_CARD_FLAG_SIGN_WITH_DECRYPT) {
|
||||||
|
size_t tmplen = sizeof(buf);
|
||||||
if (flags & SC_ALGORITHM_RSA_RAW) {
|
if (flags & SC_ALGORITHM_RSA_RAW) {
|
||||||
return sc_pkcs15_decipher(p15card, obj,flags,
|
return sc_pkcs15_decipher(p15card, obj,flags,
|
||||||
in, inlen, out, outlen);
|
in, inlen, out, outlen);
|
||||||
}
|
}
|
||||||
size_t tmplen = sizeof(buf);
|
|
||||||
if (modlen > tmplen) {
|
if (modlen > tmplen) {
|
||||||
sc_error(ctx, "Buffer too small, needs recompile!\n");
|
sc_error(ctx, "Buffer too small, needs recompile!\n");
|
||||||
return SC_ERROR_NOT_ALLOWED;
|
return SC_ERROR_NOT_ALLOWED;
|
||||||
|
|
Loading…
Reference in New Issue