version 1.45.2.2, 2000/09/01 18:23:24 |
version 1.45.2.3, 2000/11/08 21:31:25 |
|
|
/* |
/* |
* |
|
* ssh.h |
|
* |
|
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* |
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* All rights reserved |
* All rights reserved |
* |
* |
* Created: Fri Mar 17 17:09:37 1995 ylo |
|
* |
|
* Generic header file for ssh. |
* Generic header file for ssh. |
* |
* |
|
* As far as I am concerned, the code I have written for this software |
|
* can be used freely for any purpose. Any derived versions of this |
|
* software must be clearly marked as such, and if the derived work is |
|
* incompatible with the protocol description in the RFC file, it must be |
|
* called by a name other than "ssh" or "Secure Shell". |
*/ |
*/ |
|
|
/* RCSID("$OpenBSD$"); */ |
/* RCSID("$OpenBSD$"); */ |
|
|
#include "rsa.h" |
#include "rsa.h" |
#include "cipher.h" |
#include "cipher.h" |
|
|
/* |
|
* XXX |
|
* The default cipher used if IDEA is not supported by the remote host. It is |
|
* recommended that this be one of the mandatory ciphers (DES, 3DES), though |
|
* that is not required. |
|
*/ |
|
#define SSH_FALLBACK_CIPHER SSH_CIPHER_3DES |
|
|
|
/* Cipher used for encrypting authentication files. */ |
/* Cipher used for encrypting authentication files. */ |
#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES |
#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES |
|
|
|
|
#define SERVER_CONFIG_FILE ETCDIR "/sshd_config" |
#define SERVER_CONFIG_FILE ETCDIR "/sshd_config" |
#define HOST_CONFIG_FILE ETCDIR "/ssh_config" |
#define HOST_CONFIG_FILE ETCDIR "/ssh_config" |
#define HOST_DSA_KEY_FILE ETCDIR "/ssh_host_dsa_key" |
#define HOST_DSA_KEY_FILE ETCDIR "/ssh_host_dsa_key" |
|
#define DH_PRIMES ETCDIR "/primes" |
|
|
#define SSH_PROGRAM "/usr/bin/ssh" |
#define SSH_PROGRAM "/usr/bin/ssh" |
|
|
|
|
* passphrase (allocated with xmalloc). Exits if EOF is encountered. If |
* passphrase (allocated with xmalloc). Exits if EOF is encountered. If |
* from_stdin is true, the passphrase will be read from stdin instead. |
* from_stdin is true, the passphrase will be read from stdin instead. |
*/ |
*/ |
char *read_passphrase(const char *prompt, int from_stdin); |
char *read_passphrase(char *prompt, int from_stdin); |
|
|
|
|
/*------------ Definitions for logging. -----------------------*/ |
/*------------ Definitions for logging. -----------------------*/ |
|
|
SYSLOG_LEVEL_ERROR, |
SYSLOG_LEVEL_ERROR, |
SYSLOG_LEVEL_INFO, |
SYSLOG_LEVEL_INFO, |
SYSLOG_LEVEL_VERBOSE, |
SYSLOG_LEVEL_VERBOSE, |
SYSLOG_LEVEL_DEBUG |
SYSLOG_LEVEL_DEBUG1, |
|
SYSLOG_LEVEL_DEBUG2, |
|
SYSLOG_LEVEL_DEBUG3 |
} LogLevel; |
} LogLevel; |
/* Initializes logging. */ |
/* Initializes logging. */ |
void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); |
void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); |
|
|
void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
|
void debug2(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
|
void debug3(const char *fmt,...) __attribute__((format(printf, 1, 2))); |
|
|
/* same as fatal() but w/o logging */ |
/* same as fatal() but w/o logging */ |
void fatal_cleanup(void); |
void fatal_cleanup(void); |