diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-03 16:23:03 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-03 16:23:03 -0500 |
commit | cf7c6f533331ff032d8949663ab2abe618da9cb4 (patch) | |
tree | 05b83585e594685f83f626c21071172be1d607e5 /include/u-boot/rsa.h | |
parent | 8f5bfb7615e82ffccebf79530b08034f81e56268 (diff) | |
parent | fb0204e48b3e5ed5ecdfab89229140b6d4a1a08b (diff) |
Merge branch '2018-12-03-master-imports'
- Baltos platform updates
- rtc m41t62 converted to DM.
- PowerPC MPC8xx DM conversion
- Verified boot updates
Diffstat (limited to 'include/u-boot/rsa.h')
-rw-r--r-- | include/u-boot/rsa.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index 68bcb14c74d..2d3024d8b71 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -97,6 +97,16 @@ static inline int rsa_add_verify_data(struct image_sign_info *info, int rsa_verify(struct image_sign_info *info, const struct image_region region[], int region_count, uint8_t *sig, uint sig_len); + +int padding_pkcs_15_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len); + +#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT +int padding_pss_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len); +#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */ #else static inline int rsa_verify(struct image_sign_info *info, const struct image_region region[], int region_count, @@ -104,8 +114,26 @@ static inline int rsa_verify(struct image_sign_info *info, { return -ENXIO; } + +static inline int padding_pkcs_15_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len) +{ + return -ENXIO; +} + +#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT +static inline int padding_pss_verify(struct image_sign_info *info, + uint8_t *msg, int msg_len, + const uint8_t *hash, int hash_len) +{ + return -ENXIO; +} +#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */ #endif +#define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" + #define RSA2048_BYTES (2048 / 8) #define RSA4096_BYTES (4096 / 8) |