Submitted by: Bodo Moeller and Adam Langley (Google).
[openssl.git] / ssl / ssl_ciph.c
index 52f91cfe6095a72a0bdec2b99e03caf3516255de..5e2d436da39a333069996c0a2c25b65c3fe29366 100644 (file)
@@ -1091,10 +1091,11 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
        *cipher_list_by_id = tmp_cipher_list;
        (void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
 
+       sk_SSL_CIPHER_sort(*cipher_list_by_id);
        return(cipherstack);
        }
 
-char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
+char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int len)
        {
        int is_export,pkl,kl;
        const char *ver,*exp_str;