sync code with last fixes and improvements from OpenBSD
This commit is contained in:
parent
f57be82572
commit
58b04bcee7
468 changed files with 9958 additions and 7882 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: ikev2_msg.c,v 1.96 2023/06/28 14:10:24 tobhe Exp $ */
|
||||
/* $OpenBSD: ikev2_msg.c,v 1.97 2023/07/18 15:07:41 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
|
||||
|
@ -300,7 +300,7 @@ ikev2_msg_send(struct iked *env, struct iked_message *msg)
|
|||
log_debug("%s: failed to set NAT-T", __func__);
|
||||
return (-1);
|
||||
}
|
||||
if (ibuf_cat(new, buf) == -1) {
|
||||
if (ibuf_add_buf(new, buf) == -1) {
|
||||
ibuf_free(new);
|
||||
log_debug("%s: failed to set NAT-T", __func__);
|
||||
return (-1);
|
||||
|
@ -779,7 +779,7 @@ ikev2_msg_send_encrypt(struct iked *env, struct iked_sa *sa, struct ibuf **ep,
|
|||
log_debug("%s: encryption failed", __func__);
|
||||
goto done;
|
||||
}
|
||||
if (ibuf_cat(buf, e) != 0)
|
||||
if (ibuf_add_buf(buf, e) != 0)
|
||||
goto done;
|
||||
|
||||
/* Add integrity checksum (HMAC) */
|
||||
|
@ -887,7 +887,7 @@ ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa,
|
|||
log_debug("%s: encryption failed", __func__);
|
||||
goto done;
|
||||
}
|
||||
if (ibuf_cat(buf, e) != 0)
|
||||
if (ibuf_add_buf(buf, e) != 0)
|
||||
goto done;
|
||||
|
||||
/* Add integrity checksum (HMAC) */
|
||||
|
@ -961,7 +961,7 @@ ikev2_msg_auth(struct iked *env, struct iked_sa *sa, int response)
|
|||
|
||||
if ((authmsg = ibuf_dup(buf)) == NULL)
|
||||
return (NULL);
|
||||
if (ibuf_cat(authmsg, nonce) != 0)
|
||||
if (ibuf_add_buf(authmsg, nonce) != 0)
|
||||
goto fail;
|
||||
|
||||
if ((hash_setkey(sa->sa_prf, ibuf_data(prfkey),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue