summaryrefslogtreecommitdiff
path: root/cmd/ssltap
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2015-08-12 09:44:25 -0700
committerMartin Thomson <martin.thomson@gmail.com>2015-08-12 09:44:25 -0700
commit225703849bf43ff466e4dcfd3b68c30486e8ad12 (patch)
treea6970da1dad182eb7e0d6a346cec7bb89205a789 /cmd/ssltap
parentdf18e4c7e5e9ad31fab45575896fba7d2bc24250 (diff)
downloadnss-hg-225703849bf43ff466e4dcfd3b68c30486e8ad12.tar.gz
Backed out changeset 4355f55afeb2 (Bug 1158489)
Diffstat (limited to 'cmd/ssltap')
-rw-r--r--cmd/ssltap/ssltap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/cmd/ssltap/ssltap.c b/cmd/ssltap/ssltap.c
index 8ea465ef3..170420a6f 100644
--- a/cmd/ssltap/ssltap.c
+++ b/cmd/ssltap/ssltap.c
@@ -41,12 +41,12 @@ struct _DataBuffer;
typedef struct _DataBufferList {
struct _DataBuffer *first,*last;
- unsigned int size;
+ int size;
int isEncrypted;
unsigned char * msgBuf;
- unsigned int msgBufOffset;
- unsigned int msgBufSize;
- unsigned int hMACsize;
+ int msgBufOffset;
+ int msgBufSize;
+ int hMACsize;
} DataBufferList;
typedef struct _DataBuffer {
@@ -566,7 +566,7 @@ void print_sslv2(DataBufferList *s, unsigned char *recordBuf, unsigned int recor
(PRUint32)(GET_SHORT((chv2->rndlength))),
(PRUint32)(GET_SHORT((chv2->rndlength))));
PR_fprintf(PR_STDOUT," cipher-suites = { \n");
- for (p=0;p<(PRUint32)GET_SHORT((chv2->cslength));p+=3) {
+ for (p=0;p<GET_SHORT((chv2->cslength));p+=3) {
PRUint32 cs_int = GET_24((&chv2->csuites[p]));
const char *cs_str = V2CipherString(cs_int);
@@ -575,17 +575,17 @@ void print_sslv2(DataBufferList *s, unsigned char *recordBuf, unsigned int recor
}
q = p;
PR_fprintf(PR_STDOUT," }\n");
- if (GET_SHORT((chv2->sidlength))) {
+ if (chv2->sidlength) {
PR_fprintf(PR_STDOUT," session-id = { ");
- for (p=0;p<(PRUint32)GET_SHORT((chv2->sidlength));p+=2) {
+ for (p=0;p<GET_SHORT((chv2->sidlength));p+=2) {
PR_fprintf(PR_STDOUT,"0x%04x ",(PRUint32)(GET_SHORT((&chv2->csuites[p+q]))));
}
}
q += p;
PR_fprintf(PR_STDOUT,"}\n");
- if (GET_SHORT((chv2->rndlength))) {
+ if (chv2->rndlength) {
PR_fprintf(PR_STDOUT," challenge = { ");
- for (p=0;p<(PRUint32)GET_SHORT((chv2->rndlength));p+=2) {
+ for (p=0;p<GET_SHORT((chv2->rndlength));p+=2) {
PR_fprintf(PR_STDOUT,"0x%04x ",(PRUint32)(GET_SHORT((&chv2->csuites[p+q]))));
}
PR_fprintf(PR_STDOUT,"}\n");
@@ -978,7 +978,7 @@ void print_ssl3_handshake(unsigned char *recordBuf,
{
struct sslhandshake sslh;
unsigned char * hsdata;
- unsigned int offset=0;
+ int offset=0;
PR_fprintf(PR_STDOUT," handshake {\n");
@@ -1365,7 +1365,7 @@ void print_ssl3_handshake(unsigned char *recordBuf,
offset += sslh.length + 4;
} /* while */
if (offset < recordLen) { /* stuff left over */
- unsigned int newMsgLen = recordLen - offset;
+ int newMsgLen = recordLen - offset;
if (!s->msgBuf) {
s->msgBuf = PORT_Alloc(newMsgLen);
if (!s->msgBuf) {