SP int: define errors for backward compatability

This commit is contained in:
Sean Parkinson
2021-03-02 08:34:23 +10:00
parent 4c1a94a6ad
commit 84d5d37f61

View File

@@ -666,6 +666,7 @@ typedef struct sp_ecc_ctx {
/** Result of comparison is that the first number is less than second. */ /** Result of comparison is that the first number is less than second. */
#define MP_LT -1 #define MP_LT -1
/* ERROR VALUES */
/** Error value on success. */ /** Error value on success. */
#define MP_OKAY 0 #define MP_OKAY 0
/** Error value when dynamic memory allocation fails. */ /** Error value when dynamic memory allocation fails. */
@@ -676,6 +677,10 @@ typedef struct sp_ecc_ctx {
* completion. * completion.
*/ */
#define FP_WOULDBLOCK -4 #define FP_WOULDBLOCK -4
/* Unused error. Defined for backward compatability. */
#define MP_NOT_INF -5
/* Unused error. Defined for backward compatability. */
#define MP_RANGE MP_NOT_INF
/* Number of bits in each word/digit. */ /* Number of bits in each word/digit. */
#define DIGIT_BIT SP_WORD_SIZE #define DIGIT_BIT SP_WORD_SIZE