Esempio n. 1
0
const SSL_CIPHER *dtls1_get_cipher(size_t i) {
  const SSL_CIPHER *ciph = ssl3_get_cipher(i);
  /* DTLS does not support stream ciphers. */
  if (ciph == NULL || ciph->algorithm_enc == SSL_RC4) {
    return NULL;
  }

  return ciph;
}
Esempio n. 2
0
/*
 * As it's impossible to use stream ciphers in "datagram" mode, this
 * simple filter is designed to disengage them in DTLS. Unfortunately
 * there is no universal way to identify stream SSL_CIPHER, so we have
 * to explicitly list their SSL_* codes. Currently RC4 is the only one
 * available, but if new ones emerge, they will have to be added...
 */
const SSL_CIPHER *dtls1_get_cipher(unsigned int u)
{
    const SSL_CIPHER *ciph = ssl3_get_cipher(u);

    if (ciph != NULL) {
        if (ciph->algorithm_enc == SSL_RC4)
            return NULL;
    }

    return ciph;
}
Esempio n. 3
0
/*
 * As it's impossible to use stream ciphers in "datagram" mode, this
 * simple filter is designed to disengage them in DTLS. Unfortunately
 * there is no universal way to identify stream SSL_CIPHER, so we have
 * to explicitly list their SSL_* codes. Currently RC4 is the only one
 * available, but if new ones emerge, they will have to be added...
 */
SSL_CIPHER *dtls1_get_cipher(unsigned int u)
{
    SSL_CIPHER *ciph = ssl3_get_cipher(u);

    if (ciph != NULL) {
        if ((ciph->algorithms & SSL_ENC_MASK) == SSL_RC4)
            return NULL;
    }

    return ciph;
}
Esempio n. 4
0
SSL_CIPHER *ssl23_get_cipher(unsigned int u)
	{
	unsigned int uu=ssl3_num_ciphers();

	if (u < uu)
		return(ssl3_get_cipher(u));
	else
#ifndef OPENSSL_NO_SSL2
		return(ssl2_get_cipher(u-uu));
#else
		return(NULL);
#endif
	}