diff options
author | naddy@openbsd.org <naddy@openbsd.org> | 2015-01-15 18:32:54 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-01-16 18:21:32 +1100 |
commit | ddef9995a1fa6c7a8ff3b38bfe6cf724bebf13d0 (patch) | |
tree | 9d28ba5828f81e21de7e4ea9280c0d9ce99413f5 /mac.c | |
parent | f14564c1f7792446bca143580aef0e7ac25dcdae (diff) |
upstream commit
handle UMAC128 initialization like UMAC; ok djm@ markus@
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mac.c,v 1.31 2015/01/13 19:31:40 markus Exp $ */ | 1 | /* $OpenBSD: mac.c,v 1.32 2015/01/15 18:32:54 naddy Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -158,7 +158,8 @@ mac_init(struct sshmac *mac) | |||
158 | return SSH_ERR_ALLOC_FAIL; | 158 | return SSH_ERR_ALLOC_FAIL; |
159 | return 0; | 159 | return 0; |
160 | case SSH_UMAC128: | 160 | case SSH_UMAC128: |
161 | mac->umac_ctx = umac128_new(mac->key); | 161 | if ((mac->umac_ctx = umac128_new(mac->key)) == NULL) |
162 | return SSH_ERR_ALLOC_FAIL; | ||
162 | return 0; | 163 | return 0; |
163 | default: | 164 | default: |
164 | return SSH_ERR_INVALID_ARGUMENT; | 165 | return SSH_ERR_INVALID_ARGUMENT; |