try to use handle using openssl instead of libdes better. based on patches from GOMBAS Gabor <gombasg@inf.elte.hu> and Brian May <bam@snoopy.apana.org.au>

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9681 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-02-15 04:20:54 +00:00
parent 13ade23201
commit 2aefcf796c
16 changed files with 129 additions and 26 deletions
+7 -1
View File
@@ -129,7 +129,13 @@ struct hostent *gethostbyname(const char *);
#include "roken.h"
#include "security.h"
#include <des.h> /* for des_read_pw_string */
/* des_read_pw_string */
#ifdef HAVE_OPENSSL_DES_H
#include <openssl/des.h>
#else
#include <des.h>
#endif
#if defined(__sun__) && !defined(__svr4)
int fclose(FILE*);
+5 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* Copyright (c) 1995 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -405,7 +405,11 @@ create_and_write_cookie (char *xauthfile,
auth.name_length = strlen(auth.name);
auth.data_length = cookie_sz;
auth.data = (char*)cookie;
#ifdef HAVE_OPENSSL_DES_H
krb5_generate_random_block (cookie, cookie_sz);
#else
des_rand_data (cookie, cookie_sz);
#endif
strlcpy(xauthfile, "/tmp/AXXXXXX", xauthfile_size);
fd = mkstemp(xauthfile);
+4
View File
@@ -52,5 +52,9 @@
#endif
#include <roken.h>
#include <err.h>
#ifdef HAVE_OPENSSL_DES_H
#include <openssl/des.h>
#else
#include <des.h>
#endif
#include <otp.h>
+4
View File
@@ -50,7 +50,11 @@ RCSID("$Id$");
#include <pwd.h>
#ifdef HAVE_OPENSSL_DES_H
#include <openssl/des.h>
#else
#include <des.h>
#endif
#include <krb5.h>
#include <kafs.h>
#include <err.h>
+4
View File
@@ -50,7 +50,11 @@ RCSID("$Id$");
#include "encrypt.h"
#include "misc-proto.h"
#ifdef HAVE_OPENSSL_DES_H
#include <openssl/des.h>
#else
#include <des.h>
#endif
extern int encrypt_debug_mode;
+7
View File
@@ -90,6 +90,13 @@ typedef struct {
#define SK_DES 1 /* Matched Kerberos v5 KEYTYPE_DES */
#ifdef HAVE_OPENSSL_CRYPTO_H
#include <openssl/des.h>
#define des_new_random_key des_random_key
#else
#include <des.h>
#endif
#include "enc-proto.h"
extern int encrypt_debug_mode;
-1
View File
@@ -65,7 +65,6 @@ RCSID("$Id$");
#include <arpa/telnet.h>
#endif
#include <stdio.h>
#include <des.h> /* BSD wont include this in krb.h, so we do it here */
#include <krb.h>
#include <pwd.h>
#include <stdlib.h>
-1
View File
@@ -74,7 +74,6 @@ RCSID("$Id$");
#include <pwd.h>
#include <stdio.h>
#include <des.h>
#include <krb.h>
#include <stdlib.h>
#include <string.h>
-1
View File
@@ -166,7 +166,6 @@ struct hostent *gethostbyname(const char *);
#endif
#ifdef KRB4
#include <des.h>
#include <krb.h>
#endif