diff options
author | Colin Watson <cjwatson@debian.org> | 2017-10-04 11:23:58 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-10-04 11:23:58 +0100 |
commit | 62f54f20bf351468e0124f63cc2902ee40d9b0e9 (patch) | |
tree | 3e090f2711b94ca5029d3fa3e8047b1ed1448b1f /bufbn.c | |
parent | 6fabaf6fd9b07cc8bc6a17c9c4a5b76849cfc874 (diff) | |
parent | 66bf74a92131b7effe49fb0eefe5225151869dc5 (diff) |
Import openssh_7.6p1.orig.tar.gz
Diffstat (limited to 'bufbn.c')
-rw-r--r-- | bufbn.c | 42 |
1 files changed, 1 insertions, 41 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bufbn.c,v 1.12 2014/04/30 05:29:56 djm Exp $ */ | 1 | /* $OpenBSD: bufbn.c,v 1.13 2017/04/30 23:23:54 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2012 Damien Miller <djm@mindrot.org> | 4 | * Copyright (c) 2012 Damien Miller <djm@mindrot.org> |
@@ -28,46 +28,6 @@ | |||
28 | #include "log.h" | 28 | #include "log.h" |
29 | #include "ssherr.h" | 29 | #include "ssherr.h" |
30 | 30 | ||
31 | #ifdef WITH_SSH1 | ||
32 | int | ||
33 | buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value) | ||
34 | { | ||
35 | int ret; | ||
36 | |||
37 | if ((ret = sshbuf_put_bignum1(buffer, value)) != 0) { | ||
38 | error("%s: %s", __func__, ssh_err(ret)); | ||
39 | return -1; | ||
40 | } | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | void | ||
45 | buffer_put_bignum(Buffer *buffer, const BIGNUM *value) | ||
46 | { | ||
47 | if (buffer_put_bignum_ret(buffer, value) == -1) | ||
48 | fatal("%s: buffer error", __func__); | ||
49 | } | ||
50 | |||
51 | int | ||
52 | buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) | ||
53 | { | ||
54 | int ret; | ||
55 | |||
56 | if ((ret = sshbuf_get_bignum1(buffer, value)) != 0) { | ||
57 | error("%s: %s", __func__, ssh_err(ret)); | ||
58 | return -1; | ||
59 | } | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | void | ||
64 | buffer_get_bignum(Buffer *buffer, BIGNUM *value) | ||
65 | { | ||
66 | if (buffer_get_bignum_ret(buffer, value) == -1) | ||
67 | fatal("%s: buffer error", __func__); | ||
68 | } | ||
69 | #endif /* WITH_SSH1 */ | ||
70 | |||
71 | int | 31 | int |
72 | buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) | 32 | buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) |
73 | { | 33 | { |