Fix signed/unsigned char clashes.
authorRichard Levitte <levitte@openssl.org>
Wed, 4 Jan 2006 12:02:43 +0000 (12:02 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 4 Jan 2006 12:02:43 +0000 (12:02 +0000)
apps/s_client.c
ssl/ssl_asn1.c

index 181cb3f15b19868392917cf5600fe3ef86fcd1c3..c7916677412f9cdfc385f16a64d2ebf24b88d3e5 100644 (file)
@@ -239,7 +239,7 @@ typedef struct tlsextctx_st {
 static int MS_CALLBACK ssl_servername_cb(SSL *s, int *ad, void *arg)
        {
        tlsextctx * p = (tlsextctx *) arg;
-       const unsigned char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
+       const char * hn= SSL_get_servername(s, TLSEXT_NAMETYPE_host_name);
        if (SSL_get_servername_type(s) != -1) 
                p->ack = !SSL_session_reused(s) && hn != NULL;
        else 
index e98a47fc9d91f230ede94bf91aebaadd88a35c64..1ff31d440239f41fb0e86b589efca489fe707a58 100644 (file)
@@ -186,7 +186,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
                 {
                 a.tlsext_hostname.length=strlen(in->tlsext_hostname);
                 a.tlsext_hostname.type=V_ASN1_OCTET_STRING;
-                a.tlsext_hostname.data=in->tlsext_hostname;
+                a.tlsext_hostname.data=(unsigned char *)in->tlsext_hostname;
                 }                
 #endif /* OPENSSL_NO_TLSEXT */
 
@@ -419,7 +419,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
        M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,6);
        if (os.data)
                {
-               ret->tlsext_hostname = BUF_strndup(os.data, os.length);
+               ret->tlsext_hostname = BUF_strndup((char *)os.data, os.length);
                OPENSSL_free(os.data);
                os.data = NULL;
                os.length = 0;