diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-01-21 09:54:11 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-21 21:47:28 +1100 |
commit | 7be8572b32a15d5c3dba897f252e2e04e991c307 (patch) | |
tree | 449782dce059d2eb8d28aaa3baeaedd876b915a2 /sshbuf.h | |
parent | 803178bd5da7e72be94ba5b4c4c196d4b542da4d (diff) |
upstream: Make sshpkt_get_bignum2() allocate the bignum it is
parsing rather than make the caller do it. Saves a lot of boilerplate code.
from markus@ ok djm@
OpenBSD-Commit-ID: 576bf784f9a240f5a1401f7005364e59aed3bce9
Diffstat (limited to 'sshbuf.h')
-rw-r--r-- | sshbuf.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshbuf.h,v 1.12 2019/01/21 09:52:25 djm Exp $ */ | 1 | /* $OpenBSD: sshbuf.h,v 1.13 2019/01/21 09:54:11 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller | 3 | * Copyright (c) 2011 Damien Miller |
4 | * | 4 | * |
@@ -212,7 +212,7 @@ int sshbuf_put_bignum2_bytes(struct sshbuf *buf, const void *v, size_t len); | |||
212 | int sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf, | 212 | int sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf, |
213 | const u_char **valp, size_t *lenp); | 213 | const u_char **valp, size_t *lenp); |
214 | #ifdef WITH_OPENSSL | 214 | #ifdef WITH_OPENSSL |
215 | int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM *v); | 215 | int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM **valp); |
216 | int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v); | 216 | int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v); |
217 | # ifdef OPENSSL_HAS_ECC | 217 | # ifdef OPENSSL_HAS_ECC |
218 | int sshbuf_get_ec(struct sshbuf *buf, EC_POINT *v, const EC_GROUP *g); | 218 | int sshbuf_get_ec(struct sshbuf *buf, EC_POINT *v, const EC_GROUP *g); |