summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authfile.c2
-rw-r--r--krl.c3
-rw-r--r--ssh-agent.c2
-rw-r--r--ssh-keygen.c10
-rw-r--r--sshbuf.h4
5 files changed, 4 insertions, 17 deletions
diff --git a/authfile.c b/authfile.c
index de9708607..d47e0058f 100644
--- a/authfile.c
+++ b/authfile.c
@@ -551,12 +551,10 @@ sshkey_check_revoked(struct sshkey *key, const char *revoked_keys_file)
551{ 551{
552 int r; 552 int r;
553 553
554#ifdef WITH_OPENSSL
555 r = ssh_krl_file_contains_key(revoked_keys_file, key); 554 r = ssh_krl_file_contains_key(revoked_keys_file, key);
556 /* If this was not a KRL to begin with then continue below */ 555 /* If this was not a KRL to begin with then continue below */
557 if (r != SSH_ERR_KRL_BAD_MAGIC) 556 if (r != SSH_ERR_KRL_BAD_MAGIC)
558 return r; 557 return r;
559#endif
560 558
561 /* 559 /*
562 * If the file is not a KRL or we can't handle KRLs then attempt to 560 * If the file is not a KRL or we can't handle KRLs then attempt to
diff --git a/krl.c b/krl.c
index b19def79f..3917338f9 100644
--- a/krl.c
+++ b/krl.c
@@ -18,8 +18,6 @@
18 18
19#include "includes.h" 19#include "includes.h"
20 20
21#ifdef WITH_OPENSSL /* XXX just fix bignums and this is good */
22
23#include <sys/types.h> 21#include <sys/types.h>
24#include <sys/param.h> 22#include <sys/param.h>
25#include <openbsd-compat/sys-tree.h> 23#include <openbsd-compat/sys-tree.h>
@@ -1284,4 +1282,3 @@ ssh_krl_file_contains_key(const char *path, const struct sshkey *key)
1284 errno = oerrno; 1282 errno = oerrno;
1285 return r; 1283 return r;
1286} 1284}
1287#endif /* WITH_OPENSSL */
diff --git a/ssh-agent.c b/ssh-agent.c
index 4925d47a3..43000a429 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -524,6 +524,7 @@ reaper(void)
524 return (deadline - now); 524 return (deadline - now);
525} 525}
526 526
527#ifdef WITH_SSH1
527/* 528/*
528 * XXX this and the corresponding serialisation function probably belongs 529 * XXX this and the corresponding serialisation function probably belongs
529 * in key.c 530 * in key.c
@@ -565,6 +566,7 @@ agent_decode_rsa1(struct sshbuf *m, struct sshkey **kp)
565 sshkey_free(k); 566 sshkey_free(k);
566 return r; 567 return r;
567} 568}
569#endif
568 570
569static void 571static void
570process_add_identity(SocketEntry *e, int version) 572process_add_identity(SocketEntry *e, int version)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 75f8e2e09..7f775ff16 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1964,7 +1964,6 @@ do_show_cert(struct passwd *pw)
1964 exit(0); 1964 exit(0);
1965} 1965}
1966 1966
1967#ifdef WITH_OPENSSL
1968static void 1967static void
1969load_krl(const char *path, struct ssh_krl **krlp) 1968load_krl(const char *path, struct ssh_krl **krlp)
1970{ 1969{
@@ -2106,12 +2105,10 @@ update_krl_from_file(struct passwd *pw, const char *file, const Key *ca,
2106 fclose(krl_spec); 2105 fclose(krl_spec);
2107 free(path); 2106 free(path);
2108} 2107}
2109#endif /* WITH_OPENSSL */
2110 2108
2111static void 2109static void
2112do_gen_krl(struct passwd *pw, int updating, int argc, char **argv) 2110do_gen_krl(struct passwd *pw, int updating, int argc, char **argv)
2113{ 2111{
2114#ifdef WITH_OPENSSL
2115 struct ssh_krl *krl; 2112 struct ssh_krl *krl;
2116 struct stat sb; 2113 struct stat sb;
2117 Key *ca = NULL; 2114 Key *ca = NULL;
@@ -2161,15 +2158,11 @@ do_gen_krl(struct passwd *pw, int updating, int argc, char **argv)
2161 ssh_krl_free(krl); 2158 ssh_krl_free(krl);
2162 if (ca != NULL) 2159 if (ca != NULL)
2163 key_free(ca); 2160 key_free(ca);
2164#else /* WITH_OPENSSL */
2165 fatal("KRLs not supported without OpenSSL");
2166#endif /* WITH_OPENSSL */
2167} 2161}
2168 2162
2169static void 2163static void
2170do_check_krl(struct passwd *pw, int argc, char **argv) 2164do_check_krl(struct passwd *pw, int argc, char **argv)
2171{ 2165{
2172#ifdef WITH_OPENSSL
2173 int i, r, ret = 0; 2166 int i, r, ret = 0;
2174 char *comment; 2167 char *comment;
2175 struct ssh_krl *krl; 2168 struct ssh_krl *krl;
@@ -2192,9 +2185,6 @@ do_check_krl(struct passwd *pw, int argc, char **argv)
2192 } 2185 }
2193 ssh_krl_free(krl); 2186 ssh_krl_free(krl);
2194 exit(ret); 2187 exit(ret);
2195#else /* WITH_OPENSSL */
2196 fatal("KRLs not supported without OpenSSL");
2197#endif /* WITH_OPENSSL */
2198} 2188}
2199 2189
2200static void 2190static void
diff --git a/sshbuf.h b/sshbuf.h
index ac0191936..eb0d92e10 100644
--- a/sshbuf.h
+++ b/sshbuf.h
@@ -209,11 +209,11 @@ int sshbuf_peek_string_direct(const struct sshbuf *buf, const u_char **valp,
209 * curve points. 209 * curve points.
210 */ 210 */
211int sshbuf_put_bignum2_bytes(struct sshbuf *buf, const void *v, size_t len); 211int sshbuf_put_bignum2_bytes(struct sshbuf *buf, const void *v, size_t len);
212int sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf,
213 const u_char **valp, size_t *lenp);
212#ifdef WITH_OPENSSL 214#ifdef WITH_OPENSSL
213int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM *v); 215int sshbuf_get_bignum2(struct sshbuf *buf, BIGNUM *v);
214int sshbuf_get_bignum1(struct sshbuf *buf, BIGNUM *v); 216int sshbuf_get_bignum1(struct sshbuf *buf, BIGNUM *v);
215int sshbuf_get_bignum2_bytes_direct(struct sshbuf *buf,
216 const u_char **valp, size_t *lenp);
217int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v); 217int sshbuf_put_bignum2(struct sshbuf *buf, const BIGNUM *v);
218int sshbuf_put_bignum1(struct sshbuf *buf, const BIGNUM *v); 218int sshbuf_put_bignum1(struct sshbuf *buf, const BIGNUM *v);
219# ifdef OPENSSL_HAS_ECC 219# ifdef OPENSSL_HAS_ECC