summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-08-19 11:28:11 +1000
committerDamien Miller <djm@mindrot.org>2014-08-19 11:28:11 +1000
commit88137902632aceb923990e98cf5dc923bb3ef2f5 (patch)
tree7b2fb21e286382edbc21016c81279231c2d0c46b
parent2f3d1e7fb2eabd3cfbfd8d0f7bdd2f9a1888690b (diff)
- (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC.
-rw-r--r--ChangeLog1
-rw-r--r--sshbuf.h16
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2cb513679..a9bef01cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
120140819 120140819
2 - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen 2 - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen
3 - (djm) [sshbuf.h] Fix compilation on systems without OPENSSL_HAS_ECC.
3 4
420140811 520140811
5 - (djm) [myproposal.h] Make curve25519 KEX dependent on 6 - (djm) [myproposal.h] Make curve25519 KEX dependent on
diff --git a/sshbuf.h b/sshbuf.h
index 4561c0637..3602bc53f 100644
--- a/sshbuf.h
+++ b/sshbuf.h
@@ -21,8 +21,12 @@
21#include <sys/types.h> 21#include <sys/types.h>
22#include <stdarg.h> 22#include <stdarg.h>
23#include <stdio.h> 23#include <stdio.h>
24#include <openssl/bn.h> 24#ifdef WITH_OPENSSL
25#include <openssl/ec.h> 25# include <openssl/bn.h>
26# ifdef OPENSSL_HAS_ECC
27# include <openssl/ec.h>
28# endif /* OPENSSL_HAS_ECC */
29#endif /* WITH_OPENSSL */
26 30
27#define SSHBUF_SIZE_MAX 0x8000000 /* Hard maximum size */ 31#define SSHBUF_SIZE_MAX 0x8000000 /* Hard maximum size */
28#define SSHBUF_REFS_MAX 0x100000 /* Max child buffers */ 32#define SSHBUF_REFS_MAX 0x100000 /* Max child buffers */
@@ -204,17 +208,19 @@ int sshbuf_peek_string_direct(const struct sshbuf *buf, const u_char **valp,
204 * Functions to extract or store SSH wire encoded bignums and elliptic 208 * Functions to extract or store SSH wire encoded bignums and elliptic
205 * curve points. 209 * curve points.
206 */ 210 */
211int sshbuf_put_bignum2_bytes(struct sshbuf *buf, const void *v, size_t len);
212#ifdef WITH_OPENSSL
207int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM *v); 213int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM *v);
208int sshbuf_get_bignum1(struct sshbuf *buf, BIGNUM *v); 214int sshbuf_get_bignum1(struct sshbuf *buf, BIGNUM *v);
209int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v); 215int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v);
210int sshbuf_put_bignum1(struct sshbuf *buf, const BIGNUM *v); 216int sshbuf_put_bignum1(struct sshbuf *buf, const BIGNUM *v);
211int sshbuf_put_bignum2_bytes(struct sshbuf *buf, const void *v, size_t len); 217# ifdef OPENSSL_HAS_ECC
212#if !defined(WITH_OPENSSL) || defined(OPENSSL_HAS_ECC)
213int sshbuf_get_ec(struct sshbuf *buf, EC_POINT *v, const EC_GROUP *g); 218int sshbuf_get_ec(struct sshbuf *buf, EC_POINT *v, const EC_GROUP *g);
214int sshbuf_get_eckey(struct sshbuf *buf, EC_KEY *v); 219int sshbuf_get_eckey(struct sshbuf *buf, EC_KEY *v);
215int sshbuf_put_ec(struct sshbuf *buf, const EC_POINT *v, const EC_GROUP *g); 220int sshbuf_put_ec(struct sshbuf *buf, const EC_POINT *v, const EC_GROUP *g);
216int sshbuf_put_eckey(struct sshbuf *buf, const EC_KEY *v); 221int sshbuf_put_eckey(struct sshbuf *buf, const EC_KEY *v);
217#endif 222# endif /* OPENSSL_HAS_ECC */
223#endif /* WITH_OPENSSL */
218 224
219/* Dump the contents of the buffer in a human-readable format */ 225/* Dump the contents of the buffer in a human-readable format */
220void sshbuf_dump(struct sshbuf *buf, FILE *f); 226void sshbuf_dump(struct sshbuf *buf, FILE *f);