Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c7b1687
  • /
  • ssl
  • /
  • f
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:8730ef535dc1b5d020fb706aeaa18edb65aad334
directory badge Iframe embedding
swh:1:dir:b7f2622dadeb26921f1a71bbeb839b474511b51b
f
/* return the actual cipher being used */
char *SSL_CIPHER_get_name(c)
SSL_CIPHER *c;
	{
	if (c != NULL)
		return(c->name);
	return("UNKNOWN");
	}

/* number of bits for symetric cipher */
int SSL_CIPHER_get_bits(c,alg_bits)
SSL_CIPHER *c;
int *alg_bits;
	{
	int ret=0,a=0;
	EVP_CIPHER *enc;

	if (c != NULL)
		{
		if (!ssl_cipher_get_evp(c,&enc,NULL))
			return(0);

		a=EVP_CIPHER_key_length(enc)*8;

		if (s->session->cipher->algorithms & SSL_EXP)
			{
			if (c->algorithm2 & SSL2_CF_8_BYTE_ENC)
				ret=64;
			else
				ret=40;
			}
		else
			ret=a;
		}

	if (alg_bits != NULL) *alg_bits=a;
	
	return(ret);
	}

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top