summaryrefslogtreecommitdiffstats
path: root/mac.h
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2015-01-13 20:31:40 +0100
committerDamien Miller <djm@mindrot.org>2015-01-14 10:43:11 +0100
commit128343bcdb0b60fc826f2733df8cf979ec1627b4 (patch)
treeec2b30d15b28ee4e5f3822493989fad1e00199f6 /mac.h
parentupstream commit (diff)
downloadopenssh-128343bcdb0b60fc826f2733df8cf979ec1627b4.tar.xz
openssh-128343bcdb0b60fc826f2733df8cf979ec1627b4.zip
upstream commit
adapt mac.c to ssherr.h return codes (de-fatal) and simplify dependencies ok djm@
Diffstat (limited to 'mac.h')
-rw-r--r--mac.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/mac.h b/mac.h
index fbe18c463..e5f6b84d9 100644
--- a/mac.h
+++ b/mac.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mac.h,v 1.8 2013/11/07 11:58:27 dtucker Exp $ */
+/* $OpenBSD: mac.h,v 1.9 2015/01/13 19:31:40 markus Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
@@ -23,9 +23,29 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef SSHMAC_H
+#define SSHMAC_H
+
+#include <sys/types.h>
+
+struct sshmac {
+ char *name;
+ int enabled;
+ u_int mac_len;
+ u_char *key;
+ u_int key_len;
+ int type;
+ int etm; /* Encrypt-then-MAC */
+ struct ssh_hmac_ctx *hmac_ctx;
+ struct umac_ctx *umac_ctx;
+};
+
int mac_valid(const char *);
char *mac_alg_list(char);
-int mac_setup(Mac *, char *);
-int mac_init(Mac *);
-u_char *mac_compute(Mac *, u_int32_t, u_char *, int);
-void mac_clear(Mac *);
+int mac_setup(struct sshmac *, char *);
+int mac_init(struct sshmac *);
+int mac_compute(struct sshmac *, u_int32_t, const u_char *, int,
+ u_char *, size_t);
+void mac_clear(struct sshmac *);
+
+#endif /* SSHMAC_H */