summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-11-12 04:58:08 +0100
committerGeoff Thorpe <geoff@openssl.org>2008-11-12 04:58:08 +0100
commit6343829a391df59e46e513c84b6264ee71ad9518 (patch)
tree9823103bf5828e47081ac906203516bdc332f577 /ssl
parentTolerate -----BEGIN PKCS #7 SIGNED DATA----- header lines as used by some (diff)
downloadopenssl-6343829a391df59e46e513c84b6264ee71ad9518.tar.xz
openssl-6343829a391df59e46e513c84b6264ee71ad9518.zip
Revert the size_t modifications from HEAD that had led to more
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/d1_enc.c18
-rw-r--r--ssl/s3_clnt.c2
-rw-r--r--ssl/ssl.h4
-rw-r--r--ssl/ssl_asn1.c2
-rw-r--r--ssl/ssl_lib.c2
-rw-r--r--ssl/t1_enc.c43
6 files changed, 32 insertions, 39 deletions
diff --git a/ssl/d1_enc.c b/ssl/d1_enc.c
index db7dad799b..ea5e12ee07 100644
--- a/ssl/d1_enc.c
+++ b/ssl/d1_enc.c
@@ -204,13 +204,11 @@ int dtls1_enc(SSL *s, int send)
{
unsigned long ui;
printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
- (void *)ds,rec->data,rec->input,l);
- printf("\tEVP_CIPHER_CTX: %ld buf_len, %ld key_len [%ld %ld], %ld iv_len\n",
- (unsigned long)ds->buf_len,
- (unsigned long)ds->cipher->key_len,
- (unsigned long)DES_KEY_SZ,
- (unsigned long)DES_SCHEDULE_SZ,
- (unsigned long)ds->cipher->iv_len);
+ ds,rec->data,rec->input,l);
+ printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n",
+ ds->buf_len, ds->cipher->key_len,
+ DES_KEY_SZ, DES_SCHEDULE_SZ,
+ ds->cipher->iv_len);
printf("\t\tIV: ");
for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
printf("\n");
@@ -234,10 +232,10 @@ int dtls1_enc(SSL *s, int send)
#ifdef KSSL_DEBUG
{
- unsigned long ki;
+ unsigned long i;
printf("\trec->data=");
- for (ki=0; ki<l; i++)
- printf(" %02x", rec->data[ki]); printf("\n");
+ for (i=0; i<l; i++)
+ printf(" %02x", rec->data[i]); printf("\n");
}
#endif /* KSSL_DEBUG */
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index fadb763f71..aae133429c 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -1034,7 +1034,7 @@ int ssl3_get_server_certificate(SSL *s)
? 0 : 1;
#ifdef KSSL_DEBUG
- printf("pkey,x = %p, %p\n", (void *)pkey,(void *)x);
+ printf("pkey,x = %p, %p\n", pkey,x);
printf("ssl_cert_type(x,pkey) = %d\n", ssl_cert_type(x,pkey));
printf("cipher, alg, nc = %s, %lx, %lx, %d\n", s->s3->tmp.new_cipher->name,
s->s3->tmp.new_cipher->algorithm_mkey, s->s3->tmp.new_cipher->algorithm_auth, need_cert);
diff --git a/ssl/ssl.h b/ssl/ssl.h
index 69e7600d2c..f23f24b737 100644
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -1518,9 +1518,9 @@ int SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c);
int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
- size_t id_len);
+ unsigned int id_len);
SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp,
- size_t length);
+ long length);
#ifdef HEADER_X509_H
X509 * SSL_get_peer_certificate(const SSL *s);
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c
index 1737be454c..8c4840219b 100644
--- a/ssl/ssl_asn1.c
+++ b/ssl/ssl_asn1.c
@@ -338,7 +338,7 @@ int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp)
}
SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
- size_t length)
+ long length)
{
int version,ssl_version=0,i;
long id;
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 2e85a560fe..803894c44f 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -432,7 +432,7 @@ int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb)
}
int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
- size_t id_len)
+ unsigned int id_len)
{
/* A quick examination of SSL_SESSION_hash and SSL_SESSION_cmp shows how
* we can "construct" a session to give us the desired check - ie. to
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index f19d68c08a..3a349920d9 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -311,16 +311,15 @@ int tls1_change_cipher_state(SSL *s, int which)
printf("\talg= %ld/%ld, comp= %p\n",
s->s3->tmp.new_cipher->algorithm_mkey,
s->s3->tmp.new_cipher->algorithm_auth,
- (void *)comp);
- printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", (void *)c);
- printf("\tevp_cipher: nid, blksz= %d, %ld, keylen=%ld, ivlen=%ld\n",
- c->nid,(unsigned long)c->block_size,
- (unsigned long)c->key_len,(unsigned long)c->iv_len);
+ comp);
+ printf("\tevp_cipher == %p ==? &d_cbc_ede_cipher3\n", c);
+ printf("\tevp_cipher: nid, blksz= %d, %d, keylen=%d, ivlen=%d\n",
+ c->nid,c->block_size,c->key_len,c->iv_len);
printf("\tkey_block: len= %d, data= ", s->s3->tmp.key_block_length);
{
- int ki;
- for (ki=0; ki<s->s3->tmp.key_block_length; ki++)
- printf("%02x", key_block[ki]); printf("\n");
+ int i;
+ for (i=0; i<s->s3->tmp.key_block_length; i++)
+ printf("%02x", key_block[i]); printf("\n");
}
#endif /* KSSL_DEBUG */
@@ -485,13 +484,11 @@ printf("which = %04X\nmac key=",which);
s->session->key_arg_length=0;
#ifdef KSSL_DEBUG
{
- int ki;
+ int i;
printf("EVP_CipherInit_ex(dd,c,key=,iv=,which)\n");
- printf("\tkey= ");
- for (ki=0; ki<c->key_len; ki++) printf("%02x", key[ki]);
+ printf("\tkey= "); for (i=0; i<c->key_len; i++) printf("%02x", key[i]);
printf("\n");
- printf("\t iv= ");
- for (ki=0; ki<c->iv_len; ki++) printf("%02x", iv[ki]);
+ printf("\t iv= "); for (i=0; i<c->iv_len; i++) printf("%02x", iv[i]);
printf("\n");
}
#endif /* KSSL_DEBUG */
@@ -666,13 +663,11 @@ int tls1_enc(SSL *s, int send)
{
unsigned long ui;
printf("EVP_Cipher(ds=%p,rec->data=%p,rec->input=%p,l=%ld) ==>\n",
- (void *)ds,rec->data,rec->input,l);
- printf("\tEVP_CIPHER_CTX: %ld buf_len, %ld key_len [%ld %ld], %ld iv_len\n",
- (unsigned long)ds->buf_len,
- (unsigned long)ds->cipher->key_len,
- (unsigned long)DES_KEY_SZ,
- (unsigned long)DES_SCHEDULE_SZ,
- (unsigned long)ds->cipher->iv_len);
+ ds,rec->data,rec->input,l);
+ printf("\tEVP_CIPHER_CTX: %d buf_len, %d key_len [%d %d], %d iv_len\n",
+ ds->buf_len, ds->cipher->key_len,
+ DES_KEY_SZ, DES_SCHEDULE_SZ,
+ ds->cipher->iv_len);
printf("\t\tIV: ");
for (i=0; i<ds->cipher->iv_len; i++) printf("%02X", ds->iv[i]);
printf("\n");
@@ -696,10 +691,10 @@ int tls1_enc(SSL *s, int send)
#ifdef KSSL_DEBUG
{
- unsigned long ki;
+ unsigned long i;
printf("\trec->data=");
- for (ki=0; ki<l; i++)
- printf(" %02x", rec->data[ki]); printf("\n");
+ for (i=0; i<l; i++)
+ printf(" %02x", rec->data[i]); printf("\n");
}
#endif /* KSSL_DEBUG */
@@ -922,7 +917,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
int col = 0, sol = 0;
#ifdef KSSL_DEBUG
- printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", (void *)s,out, p,len);
+ printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", s,out, p,len);
#endif /* KSSL_DEBUG */
#ifdef TLSEXT_TYPE_opaque_prf_input