err/err.c: add err_clear_last_constant_time.
[openssl.git] / crypto / constant_time_locl.h
index c786aea949476be9c1843aeff9520dc3745042c1..a5734f2fece685d74ecb0a7b3a7f1ea1c0cd95c1 100644 (file)
@@ -204,6 +204,12 @@ static inline int constant_time_select_int(unsigned int mask, int a, int b)
     return (int)(constant_time_select(mask, (unsigned)(a), (unsigned)(b)));
 }
 
+/*
+ * Expected usage pattern is to unconditionally set error and then
+ * wipe it if there was no actual error. |clear| is 1 or 0.
+ */
+void err_clear_last_constant_time(int clear);
+
 #ifdef __cplusplus
 }
 #endif