Browse Source

remove unused stub functions, init code

OPENBSD_5_8
Brent Cook 9 years ago
parent
commit
3efb0d135f
2 changed files with 6 additions and 27 deletions
  1. +0
    -23
      include/tls.h
  2. +6
    -4
      patches/0011-Notify-the-user-when-constraint-support-is-disabled.patch

+ 0
- 23
include/tls.h View File

@ -5,27 +5,4 @@
#ifdef HAVE_LIBTLS
#include_next <tls.h>
#else
#ifndef LIBCOMPAT_LIBTLS_H
#define LIBCOMPAT_LIBTLS_H
#include <sys/types.h>
#include <stdint.h>
static inline int
tls_init(void)
{
return -1;
}
static inline uint8_t *
tls_load_file(const char *_file, size_t *_len, char *_password)
{
return NULL;
}
#endif
#endif

+ 6
- 4
patches/0011-Notify-the-user-when-constraint-support-is-disabled.patch View File

@ -1,4 +1,4 @@
From c964f9f8a4ca92d961255935ac1ed2f681702607 Mon Sep 17 00:00:00 2001
From 0532e94c831af38d015d3bcd56740403cb391e26 Mon Sep 17 00:00:00 2001
From: Brent Cook <busterb@gmail.com>
Date: Fri, 27 Mar 2015 23:14:15 -0500
Subject: [PATCH 11/11] Notify the user when constraint support is disabled.
@ -27,14 +27,16 @@ index 2e39604..779aed6 100644
}
diff --git a/src/usr.sbin/ntpd/ntp.c b/src/usr.sbin/ntpd/ntp.c
index 0a9b4be..eb8af7b 100644
index 0a9b4be..285e30d 100644
--- a/src/usr.sbin/ntpd/ntp.c
+++ b/src/usr.sbin/ntpd/ntp.c
@@ -112,10 +112,12 @@ ntp_main(int pipe_prnt[2], int fd_ctl, struct ntpd_conf *nconf,
@@ -110,12 +110,14 @@ ntp_main(int pipe_prnt[2], int fd_ctl, struct ntpd_conf *nconf,
return (pid);
}
+#ifdef HAVE_LIBTLS
tls_init();
+#ifdef HAVE_LIBTLS
/* Verification will be turned off if CA is not found */
if ((conf->ca = tls_load_file(CONSTRAINT_CA,
&conf->ca_len, NULL)) == NULL)


Loading…
Cancel
Save