treewide: Fix Marek's name and change my e-mail address
[platform/kernel/u-boot.git] / include / u-boot / ecdsa.h
index 979690d..6e0269e 100644 (file)
@@ -15,7 +15,6 @@
  * @see "struct crypto_algo"
  * @{
  */
-#if IMAGE_ENABLE_SIGN
 /**
  * sign() - calculate and return signature for given input data
  *
@@ -45,26 +44,12 @@ int ecdsa_sign(struct image_sign_info *info, const struct image_region region[],
  *
  * @info:      Specifies key and FIT information
  * @keydest:   Destination FDT blob for public key data
- * @return: 0, on success, -ENOSPC if the keydest FDT blob ran out of space,
- * other -ve value on error
+ * @return: node offset within the FDT blob where the data was written on
+ *     success, -ENOSPC if the keydest FDT blob ran out of space, other -ve
+ *     value on other error
  */
 int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest);
-#else
-static inline
-int ecdsa_sign(struct image_sign_info *info, const struct image_region region[],
-              int region_count, uint8_t **sigp, uint *sig_len)
-{
-       return -ENXIO;
-}
-
-static inline
-int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest)
-{
-       return -ENXIO;
-}
-#endif
 
-#if IMAGE_ENABLE_VERIFY_ECDSA
 /**
  * verify() - Verify a signature against some data
  *
@@ -73,20 +58,11 @@ int ecdsa_add_verify_data(struct image_sign_info *info, void *keydest)
  * @data_len:  Data length
  * @sig:       Signature
  * @sig_len:   Number of bytes in signature
- * @return 0 if verified, -ve on error
+ * Return: 0 if verified, -ve on error
  */
 int ecdsa_verify(struct image_sign_info *info,
                 const struct image_region region[], int region_count,
                 uint8_t *sig, uint sig_len);
-#else
-static inline
-int ecdsa_verify(struct image_sign_info *info,
-                const struct image_region region[], int region_count,
-                uint8_t *sig, uint sig_len)
-{
-       return -ENXIO;
-}
-#endif
 /** @} */
 
 #define ECDSA256_BYTES (256 / 8)