summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@google.com>2017-02-07 11:40:59 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-18 00:39:28 -0800
commit83bd850f3fd45648bb811f6080efac396c8a2062 (patch)
tree3e22a3c7755002b5dbe55eb0ce951afc4ab24899 /utility
parent94bd5c5069e6ca0c99754f39152bd4e059968904 (diff)
downloadvboot-83bd850f3fd45648bb811f6080efac396c8a2062.tar.gz
This also adds the required tests (keys, testcases). BRANCH=none BUG=chromium:684354 TEST=make runtests Change-Id: I5e148f8792ea325f813d76089271f3c4bcc2935d Reviewed-on: https://chromium-review.googlesource.com/438951 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'utility')
-rw-r--r--utility/dumpRSAPublicKey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/utility/dumpRSAPublicKey.c b/utility/dumpRSAPublicKey.c
index b3b7b96b..fc238d7f 100644
--- a/utility/dumpRSAPublicKey.c
+++ b/utility/dumpRSAPublicKey.c
@@ -23,8 +23,9 @@ int check(RSA* key) {
int public_exponent = BN_get_word(key->e);
int modulus = BN_num_bits(key->n);
- if (public_exponent != 65537) {
- fprintf(stderr, "WARNING: Public exponent should be 65537 (but is %d).\n",
+ if (public_exponent != 3 && public_exponent != 65537) {
+ fprintf(stderr,
+ "WARNING: Public exponent should be 3 or 65537 (but is %d).\n",
public_exponent);
}