Resolve signed vs. unsigned issues
authorRichard Levitte <levitte@openssl.org>
Mon, 13 Mar 2006 12:32:51 +0000 (12:32 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 13 Mar 2006 12:32:51 +0000 (12:32 +0000)
ssl/s3_srvr.c
ssl/ssl_asn1.c
ssl/t1_lib.c

index 43ff0d86f40b0ea27b39d1a668ddd6ebc564f1b9..121cdfb6f232f39a7123ad63acc092a784b632ba 100644 (file)
@@ -1514,7 +1514,7 @@ int ssl3_send_server_key_exchange(SSL *s)
                        {
                        /* copy PSK identity hint */
                        s2n(strlen(s->ctx->psk_identity_hint), p); 
-                       strncpy(p, s->ctx->psk_identity_hint, strlen(s->ctx->psk_identity_hint));
+                       strncpy((char *)p, s->ctx->psk_identity_hint, strlen(s->ctx->psk_identity_hint));
                        p+=strlen(s->ctx->psk_identity_hint);
                        }
 #endif
@@ -2305,7 +2305,7 @@ int ssl3_get_client_key_exchange(SSL *s)
 
                        if (s->session->psk_identity != NULL)
                                OPENSSL_free(s->session->psk_identity);
-                       s->session->psk_identity = BUF_strdup(p);
+                       s->session->psk_identity = BUF_strdup((char *)p);
                        if (s->session->psk_identity == NULL)
                                {
                                SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,
index 4845499633667ca8669e3ea354c325c042fb0872..3c2e9fae7e5b3dc3c857a438cb66646fe2fec341 100644 (file)
@@ -241,13 +241,13 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
                {
                a.psk_identity_hint.length=strlen(in->psk_identity_hint);
                a.psk_identity_hint.type=V_ASN1_OCTET_STRING;
-               a.psk_identity_hint.data=in->psk_identity_hint;
+               a.psk_identity_hint.data=(unsigned char *)(in->psk_identity_hint);
                }
        if (in->psk_identity)
                {
                a.psk_identity.length=strlen(in->psk_identity);
                a.psk_identity.type=V_ASN1_OCTET_STRING;
-               a.psk_identity.data=in->psk_identity;
+               a.psk_identity.data=(unsigned char *)(in->psk_identity);
                }
 #endif /* OPENSSL_NO_PSK */
 
@@ -548,7 +548,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
        M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,8);
        if (os.data)
                {
-               ret->psk_identity_hint = BUF_strndup(os.data, os.length);
+               ret->psk_identity_hint = BUF_strndup((char *)os.data, os.length);
                OPENSSL_free(os.data);
                os.data = NULL;
                os.length = 0;
@@ -561,7 +561,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
        M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,9);
        if (os.data)
                {
-               ret->psk_identity = BUF_strndup(os.data, os.length);
+               ret->psk_identity = BUF_strndup((char *)os.data, os.length);
                OPENSSL_free(os.data);
                os.data = NULL;
                os.length = 0;
index 330963ecabbbcd2838bc45898689934c53501f8f..24e6451aabe9729d6032340f10c6ef8dab78589f 100644 (file)
@@ -637,7 +637,7 @@ int ssl_check_serverhello_tlsext(SSL *s)
                        SSLerr(SSL_F_TLS1_CHECK_SERVERHELLO_TLSEXT,SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST);
                        return -1;
                        }
-               list = s->session->tlsext_ecpointformatlist;
+               list = (unsigned char *)(s->session->tlsext_ecpointformatlist);
                for (i = 0; i < s->session->tlsext_ecpointformatlist_length; i++)
                        {
                        if (*(list++) == TLSEXT_ECPOINTFORMAT_uncompressed)