From ddeb1bb9f749f6ee38e00c6e860d279a4060f912 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 9 Sep 2014 15:35:54 -0700 Subject: [PATCH] Verify RSA type 1 padding. --- ctaocrypt/src/rsa.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ctaocrypt/src/rsa.c b/ctaocrypt/src/rsa.c index a0ff196aa..d11b030a0 100644 --- a/ctaocrypt/src/rsa.c +++ b/ctaocrypt/src/rsa.c @@ -174,9 +174,14 @@ static int RsaUnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen, /* Require block type padValue */ invalid = (pkcsBlock[0] != padValue) || invalid; - /* skip past the padding until we find the separator */ - while (i