"make update" (added to top Makefile, and applied).
[openssl.git] / ssl / ssl_ciph.c
index b5d6f09969c5cb6c5127056e014514e2fd9317ab..4c2989c47a3028c0b0580dda57f57fb1d93925c2 100644 (file)
@@ -57,8 +57,8 @@
  */
 
 #include <stdio.h>
-#include "objects.h"
-#include "comp.h"
+#include <openssl/objects.h>
+#include <openssl/comp.h>
 #include "ssl_locl.h"
 
 #define SSL_ENC_DES_IDX                0
@@ -458,10 +458,14 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(SSL_METHOD *ssl_method,
                        {
                        ch= *l;
                        i=0;
+#ifndef CHARSET_EBCDIC
                        while ( ((ch >= 'A') && (ch <= 'Z')) ||
                                ((ch >= '0') && (ch <= '9')) ||
                                ((ch >= 'a') && (ch <= 'z')) ||
                                 (ch == '-'))
+#else
+                       while ( isalnum(ch) || (ch == '-'))
+#endif
                                 {
                                 buf[i]=ch;
                                 ch= *(++l);
@@ -610,7 +614,7 @@ err:
 
 char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        {
-        int is_export,pkl,kl;
+       int is_export,pkl,kl;
        char *ver,*exp;
        char *kx,*au,*enc,*mac;
        unsigned long alg,alg2;
@@ -619,10 +623,10 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        alg=cipher->algorithms;
        alg2=cipher->algorithm2;
 
-        is_export=SSL_IS_EXPORT(alg);
+       is_export=SSL_IS_EXPORT(alg);
        pkl=SSL_EXPORT_PKEYLENGTH(alg);
        kl=SSL_EXPORT_KEYLENGTH(alg);
-        exp=is_export?" export":"";
+       exp=is_export?" export":"";
 
        if (alg & SSL_SSLV2)
                ver="SSLv2";
@@ -634,7 +638,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        switch (alg&SSL_MKEY_MASK)
                {
        case SSL_kRSA:
-                kx=is_export?(pkl == 512 ? "RSA(512)" : "RSA(1024)"):"RSA";
+               kx=is_export?(pkl == 512 ? "RSA(512)" : "RSA(1024)"):"RSA";
                break;
        case SSL_kDHr:
                kx="DH/RSA";
@@ -646,7 +650,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
                kx="Fortezza";
                break;
        case SSL_kEDH:
-                kx=is_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH";
+               kx=is_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH";
                break;
        default:
                kx="unknown";
@@ -675,17 +679,17 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        switch (alg&SSL_ENC_MASK)
                {
        case SSL_DES:
-                enc=(is_export && kl == 5)?"DES(40)":"DES(56)";
+               enc=(is_export && kl == 5)?"DES(40)":"DES(56)";
                break;
        case SSL_3DES:
                enc="3DES(168)";
                break;
        case SSL_RC4:
-                enc=is_export?(kl == 5 ? "RC4(40)" : "RC4(56)")
+               enc=is_export?(kl == 5 ? "RC4(40)" : "RC4(56)")
                  :((alg2&SSL2_CF_8_BYTE_ENC)?"RC4(64)":"RC4(128)");
                break;
        case SSL_RC2:
-                enc=is_export?(kl == 5 ? "RC2(40)" : "RC2(56)"):"RC2(128)";
+               enc=is_export?(kl == 5 ? "RC2(40)" : "RC2(56)"):"RC2(128)";
                break;
        case SSL_IDEA:
                enc="IDEA(128)";