summaryrefslogtreecommitdiff
path: root/mac.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
committerDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
commit3f9418893e1254bda3b87e7d3af7029d11b0a6c7 (patch)
tree97662277f300ea1ab8255905b9d5d72a26f7578f /mac.c
parentd79b424e8ad424a44119f327e5ab1f79cd35649c (diff)
- djm@cvs.openbsd.org 2006/03/30 09:58:16
[authfd.c bufaux.c deattack.c gss-serv.c mac.c misc.c misc.h] [monitor_wrap.c msg.c packet.c sftp-client.c sftp-server.c ssh-agent.c] replace {GET,PUT}_XXBIT macros with functionally similar functions, silencing a heap of lint warnings. also allows them to use __bounded__ checking which can't be applied to macros; requested by and feedback from deraadt@
Diffstat (limited to 'mac.c')
-rw-r--r--mac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mac.c b/mac.c
index c155dbd3f..02bcc31ed 100644
--- a/mac.c
+++ b/mac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.c,v 1.9 2006/03/25 13:17:02 djm Exp $ */ 1/* $OpenBSD: mac.c,v 1.10 2006/03/30 09:58:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -28,11 +28,11 @@
28#include <openssl/hmac.h> 28#include <openssl/hmac.h>
29 29
30#include "xmalloc.h" 30#include "xmalloc.h"
31#include "getput.h"
32#include "log.h" 31#include "log.h"
33#include "cipher.h" 32#include "cipher.h"
34#include "kex.h" 33#include "kex.h"
35#include "mac.h" 34#include "mac.h"
35#include "misc.h"
36 36
37struct { 37struct {
38 char *name; 38 char *name;
@@ -83,7 +83,7 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen)
83 if (mac->mac_len > sizeof(m)) 83 if (mac->mac_len > sizeof(m))
84 fatal("mac_compute: mac too long"); 84 fatal("mac_compute: mac too long");
85 HMAC_Init(&c, mac->key, mac->key_len, mac->md); 85 HMAC_Init(&c, mac->key, mac->key_len, mac->md);
86 PUT_32BIT(b, seqno); 86 put_u32(b, seqno);
87 HMAC_Update(&c, b, sizeof(b)); 87 HMAC_Update(&c, b, sizeof(b));
88 HMAC_Update(&c, data, datalen); 88 HMAC_Update(&c, data, datalen);
89 HMAC_Final(&c, m, NULL); 89 HMAC_Final(&c, m, NULL);