From e99ef09706823120e65007716340bf5964ab5dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 6 Dec 2006 10:23:14 +0000 Subject: [PATCH] (rsa_create_signature): Abort when signature is longer, not shorter. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19235 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hx509/crypto.c b/lib/hx509/crypto.c index a11310885..717f595ff 100644 --- a/lib/hx509/crypto.c +++ b/lib/hx509/crypto.c @@ -321,8 +321,8 @@ rsa_create_signature(hx509_context context, "RSA private decrypt failed: %d", ret); return ret; } - if (ret < sig->length) - _hx509_abort("RSA signature prelen shorter the output len"); + if (ret > sig->length) + _hx509_abort("RSA signature prelen longer the output len"); sig->length = ret;