Пример #1
0
		if( success )
			return success;
		return( reportAuthFailure() ); */

#ifdef USE_SSH

/* Tables mapping SSH algorithm names to cryptlib algorithm IDs, in
   preferred algorithm order.  There are two of these, one that favours
   password-based authentication and one that favours PKC-based
   authentication, depending on whether the user has specified a password
   or a PKC as their authentication choice.  This is required in order to
   handle SSH's weird way of reporting authentication failures, see the
   comment in reportAuthFailure() for details */

static const ALGO_STRING_INFO FAR_BSS algoStringUserauthentPWTbl[] = {
	{ "password", 8, MK_ALGO( PSEUDOALGO_PASSWORD ) },
	{ "keyboard-interactive", 20, MK_ALGO( PSEUDOALGO_PAM ) },
	{ "publickey", 9, CRYPT_ALGO_RSA },
	{ NULL, 0, CRYPT_ALGO_NONE }, { NULL, 0, CRYPT_ALGO_NONE }
	};
static const ALGO_STRING_INFO FAR_BSS algoStringUserauthentPKCTbl[] = {
	{ "publickey", 9, CRYPT_ALGO_RSA },
	{ "password", 8, MK_ALGO( PSEUDOALGO_PASSWORD ) },
	{ "keyboard-interactive", 20, MK_ALGO( PSEUDOALGO_PAM ) },
	{ NULL, 0, CRYPT_ALGO_NONE }, { NULL, CRYPT_ALGO_NONE }
	};

/* Forward declaration for authentication function */

CHECK_RETVAL STDC_NONNULL_ARG( ( 1 ) ) \
static int processPamAuthentication( INOUT SESSION_INFO *sessionInfoPtr );
Пример #2
0
/* SSH algorithm names sent to the client, in preferred algorithm order.
   Since we have a fixed algorithm for our public key (determined by the key
   type) we only send a single value for this that's evaluated at runtime, 
   so there's no list for public-key algorithms.  In addition if the server's
   key isn't an ECC key we probably shouldn't be advertising any ECC keyex
   algorithms, so we vary what we send based on the server key type.

   The values in these lists must be present in the algorithm-name mapping 
   tables in ssh2.c */

static const CRYPT_ALGO_TYPE FAR_BSS algoKeyexEccList[] = {
#ifdef PREFER_ECC
	CRYPT_ALGO_ECDH,
#endif /* PREFER_ECC */
	MK_ALGO( PSEUDOALGO_DHE_ALT ), MK_ALGO( PSEUDOALGO_DHE ), CRYPT_ALGO_DH, 
#if !defined( PREFER_ECC )
	CRYPT_ALGO_ECDH,
#endif /* !PREFER_ECC */
	CRYPT_ALGO_NONE, CRYPT_ALGO_NONE };
static const CRYPT_ALGO_TYPE FAR_BSS algoKeyexList[] = {
	MK_ALGO( PSEUDOALGO_DHE_ALT ), MK_ALGO( PSEUDOALGO_DHE ), CRYPT_ALGO_DH, 
	CRYPT_ALGO_NONE, CRYPT_ALGO_NONE };

static const CRYPT_ALGO_TYPE FAR_BSS algoEncrList[] = {
	CRYPT_ALGO_3DES, CRYPT_ALGO_AES, CRYPT_ALGO_BLOWFISH, 
	CRYPT_ALGO_NONE, CRYPT_ALGO_NONE };

static const CRYPT_ALGO_TYPE FAR_BSS algoMACList[] = {
	CRYPT_ALGO_HMAC_SHA2, CRYPT_ALGO_HMAC_SHA1, CRYPT_ALGO_HMAC_MD5, 
	CRYPT_ALGO_NONE, CRYPT_ALGO_NONE };