- {
- return(ssl3_num_ciphers()
-#ifndef OPENSSL_NO_SSL2
- + ssl2_num_ciphers()
-#endif
- );
- }
-
-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
- }
-
-/* This function needs to check if the ciphers required are actually
- * available */
-SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
- {
- SSL_CIPHER c,*cp;
- unsigned long id;
- int n;
-
- n=ssl3_num_ciphers();
- id=0x03000000|((unsigned long)p[0]<<16L)|
- ((unsigned long)p[1]<<8L)|(unsigned long)p[2];
- c.id=id;
- cp=ssl3_get_cipher_by_char(p);
-#ifndef OPENSSL_NO_SSL2
- if (cp == NULL)
- cp=ssl2_get_cipher_by_char(p);
-#endif
- return(cp);
- }
+{
+ return (ssl3_num_ciphers());
+}
+
+const SSL_CIPHER *ssl23_get_cipher(unsigned int u)
+{
+ return (ssl3_get_cipher(u));
+}
+
+/*
+ * This function needs to check if the ciphers required are actually
+ * available
+ */
+const SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
+{
+ return (ssl3_get_cipher_by_char(p));
+}