From 08f9924ec6b3f2b7dea8477fc3f3cd77f799f099 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 19 Apr 2012 15:28:15 +0000 Subject: [PATCH] Properly use SHA1_Final() instead of SHA_Final(). In this case it doesn't really matter, as long as we turn a TTY name into a set of shuffled bytes. Still, for correctness we should use the proper function. MFC after: 2 weeks --- lib/libulog/ulog_login.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libulog/ulog_login.c b/lib/libulog/ulog_login.c index 3058b9f53399..a053328ac22d 100644 --- a/lib/libulog/ulog_login.c +++ b/lib/libulog/ulog_login.c @@ -55,7 +55,7 @@ ulog_fill(struct utmpx *utx, const char *line) SHA1_Init(&c); SHA1_Update(&c, "libulog", 7); SHA1_Update(&c, utx->ut_line, sizeof utx->ut_line); - SHA_Final(id, &c); + SHA1_Final(id, &c); memcpy(utx->ut_id, id, MIN(sizeof utx->ut_id, sizeof id)); }