Deleted Added
full compact
hostfile.c (149753) hostfile.c (157019)
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.35 2005/07/27 10:39:03 dtucker Exp $");
39RCSID("$OpenBSD: hostfile.c,v 1.36 2005/11/22 03:36: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"

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

83
84 ret = __b64_pton(b64salt, salt, salt_len);
85 xfree(b64salt);
86 if (ret == -1) {
87 debug2("extract_salt: salt decode error");
88 return (-1);
89 }
90 if (ret != SHA_DIGEST_LENGTH) {
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"

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

83
84 ret = __b64_pton(b64salt, salt, salt_len);
85 xfree(b64salt);
86 if (ret == -1) {
87 debug2("extract_salt: salt decode error");
88 return (-1);
89 }
90 if (ret != SHA_DIGEST_LENGTH) {
91 debug2("extract_salt: expected salt len %u, got %u",
92 salt_len, ret);
91 debug2("extract_salt: expected salt len %d, got %d",
92 SHA_DIGEST_LENGTH, ret);
93 return (-1);
94 }
95
96 return (0);
97}
98
99char *
100host_hash(const char *host, const char *name_from_hostfile, u_int src_len)

--- 243 unchanged lines hidden ---
93 return (-1);
94 }
95
96 return (0);
97}
98
99char *
100host_hash(const char *host, const char *name_from_hostfile, u_int src_len)

--- 243 unchanged lines hidden ---