Added ksecprintf for securely printing messages from the kernel.
If SECRET_TESTING is defined, the function will compute and print a salt value and the hmac/sha256 hash of the message, which can be verified from the test161 server.
This commit is contained in:
@@ -45,6 +45,6 @@
|
||||
*/
|
||||
|
||||
#undef SECRET_TESTING
|
||||
#define SECRET 0
|
||||
#define SECRET ""
|
||||
|
||||
#endif /* _SECRET_H_ */
|
||||
|
@@ -174,7 +174,9 @@ int ll16test(int, char **);
|
||||
#define SUCCESS 0
|
||||
#define FAIL 1
|
||||
|
||||
void success(bool, uint32_t, const char *);
|
||||
int success(bool, const char *, const char *);
|
||||
|
||||
int ksecprintf(const char *secret, const char *msg, const char *name);
|
||||
|
||||
void random_yielder(uint32_t);
|
||||
void random_spinner(uint32_t);
|
||||
|
Reference in New Issue
Block a user