Message ID | CAHJF=87haBPAZb3agWi6z4boHa7Krxiym92pZ1ZQziZqsYbyUg@mail.gmail.com |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
Series | Allow FIT Image Signature Verification to use RSA Public Key specified in DER Format | expand |
diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 83f7564101..3e60dc6b50 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -499,7 +499,11 @@ int rsa_verify_hash(struct image_sign_info *info, { int ret = -EACCES; - if (CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY) && !info->fdt_blob) { + // Der Format Public Key + char pub_key_der[] = {0x30, 0x82, .... 0x2F}; # <-------------- Hardcoded the DER Pub Key here + + info->key = pub_key_der; + if (CONFIG_IS_ENABLED(RSA_VERIFY_WITH_PKEY)) { /* don't rely on fdt properties */ ret = rsa_verify_with_pkey(info, hash, sig, sig_len);