[Heimdal-source-changes] [Heimdal] branch master updated. heimdal-1.5pre2-735-g846f6e0
lha at h5l.org
lha at h5l.org
Ons Sep 12 05:49:27 CEST 2012
The branch master has been updated
via 846f6e0 always produce a signature that is the size of the modulus
from 12f7c32 dd include flags for test cases.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 846f6e0e7b76c3738652860ab1665cb497982576
Author: Love Hornquist Astrand <lha at h5l.org>
Date: Tue Sep 11 20:45:43 2012 -0700
always produce a signature that is the size of the modulus
846f6e0e7b76c3738652860ab1665cb497982576
diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c
index 0971438..491923a 100644
--- a/lib/hx509/crypto.c
+++ b/lib/hx509/crypto.c
@@ -740,11 +740,13 @@ rsa_create_signature(hx509_context context,
"RSA private encrypt failed: %d", ret);
return ret;
}
- if ((size_t)ret > sig->length)
+ if (sig->length > (size_t)ret) {
+ size = sig->length - ret;
+ memmove((uint8_t *)sig->data + size, sig->data, ret);
+ memset(sig->data, 0, size);
+ } else if (sig->length < (size_t)ret)
_hx509_abort("RSA signature prelen longer the output len");
- sig->length = ret;
-
return 0;
}
-----------------------------------------------------------------------
Summary of changes:
lib/hx509/crypto.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
More information about the Heimdal-source-changes
mailing list