Deleted Added
full compact
hostfile.c (147005) hostfile.c (149753)
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions for manipulating the known hosts files.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this

--- 22 unchanged lines hidden (view full) ---

31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include "includes.h"
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions for manipulating the known hosts files.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this

--- 22 unchanged lines hidden (view full) ---

31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include "includes.h"
39RCSID("$OpenBSD: hostfile.c,v 1.34 2005/03/10 22:01:05 deraadt Exp $");
39RCSID("$OpenBSD: hostfile.c,v 1.35 2005/07/27 10:39:03 dtucker Exp $");
40
41#include <resolv.h>
42#include <openssl/hmac.h>
43#include <openssl/sha.h>
44
45#include "packet.h"
46#include "match.h"
47#include "key.h"

--- 262 unchanged lines hidden (view full) ---

310 */
311
312int
313add_host_to_hostfile(const char *filename, const char *host, const Key *key,
314 int store_hash)
315{
316 FILE *f;
317 int success = 0;
40
41#include <resolv.h>
42#include <openssl/hmac.h>
43#include <openssl/sha.h>
44
45#include "packet.h"
46#include "match.h"
47#include "key.h"

--- 262 unchanged lines hidden (view full) ---

310 */
311
312int
313add_host_to_hostfile(const char *filename, const char *host, const Key *key,
314 int store_hash)
315{
316 FILE *f;
317 int success = 0;
318 char *hashed_host;
318 char *hashed_host = NULL;
319
320 if (key == NULL)
321 return 1; /* XXX ? */
322 f = fopen(filename, "a");
323 if (!f)
324 return 0;
325
326 if (store_hash) {

--- 17 unchanged lines hidden ---
319
320 if (key == NULL)
321 return 1; /* XXX ? */
322 f = fopen(filename, "a");
323 if (!f)
324 return 0;
325
326 if (store_hash) {

--- 17 unchanged lines hidden ---