]> Cypherpunks repositories - gostls13.git/commit
crypto/rsa: reject invalid length PKCS#1v1.5 signatures
authorRoland Shoemaker <rolandshoemaker@gmail.com>
Sun, 29 Mar 2020 03:04:51 +0000 (03:04 +0000)
committerFilippo Valsorda <filippo@golang.org>
Tue, 31 Mar 2020 17:41:35 +0000 (17:41 +0000)
commit5db079d2e5f97952be288c28a3a0690a523efdce
treef58c957565383e6e51087b383901864afd6fb078
parent5970480c68fc7ecb6eaf3a5f90f49ae4504fa060
crypto/rsa: reject invalid length PKCS#1v1.5 signatures

Per RFC 8017, reject signatures which are not the same length as the RSA
modulus. This matches the behavior of SignPKCS1v15 which properly left pads
the signatures it generates to the size of the modulus.

Fixes #21896

Change-Id: I2c42a0b24cf7fff158ece604b6f0c521a856d932
GitHub-Last-Rev: 6040f7990633630a0ad157cb17e016bb7db98a27
GitHub-Pull-Request: golang/go#38140
Reviewed-on: https://go-review.googlesource.com/c/go/+/226203
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/rsa/pkcs1v15.go
src/crypto/rsa/pkcs1v15_test.go