You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Ben Laurie <be...@hyperreal.com> on 1996/03/26 20:05:26 UTC
cvs commit: apache/src mod_digest.c util_md5.c
ben 96/03/26 11:05:26
Modified: src mod_digest.c util_md5.c
Log:
Fix warnings and errors on SCO 5.
Revision Changes Path
1.3 +10 -6 apache/src/mod_digest.c
Index: mod_digest.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_digest.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C3 -r1.2 -r1.3
*** mod_digest.c 1996/03/22 01:05:21 1.2
--- mod_digest.c 1996/03/26 19:05:24 1.3
***************
*** 123,129 ****
char *auth_line = table_get(r->headers_in, "Authorization");
int l = strlen(auth_line);
int s = 0, vk = 0, vv = 0;
! char *t, key[l], value[l];
if (!(t = auth_type(r)) || strcasecmp(t, "Digest"))
return DECLINED;
--- 123,129 ----
char *auth_line = table_get(r->headers_in, "Authorization");
int l = strlen(auth_line);
int s = 0, vk = 0, vv = 0;
! char *t, *key, *value;
if (!(t = auth_type(r)) || strcasecmp(t, "Digest"))
return DECLINED;
***************
*** 145,150 ****
--- 145,153 ----
return AUTH_REQUIRED;
}
+ key=palloc(r->pool,l);
+ value=palloc(r->pool,l);
+
/* There's probably a better way to do this, but for the time being... */
#define D_KEY 0
***************
*** 226,236 ****
/* The actual MD5 code... whee */
char *find_digest(request_rec *r, digest_header_rec *h, char *a1) {
! return md5(r->pool, pstrcat(r->pool, a1, ":", h->nonce, ":",
! md5(r->pool,
! pstrcat(r->pool, r->method, ":",
! h->requested_uri,NULL)),
! NULL));
}
/* These functions return 0 if client is OK, and proper error status
--- 229,240 ----
/* The actual MD5 code... whee */
char *find_digest(request_rec *r, digest_header_rec *h, char *a1) {
! return md5(r->pool,
! (unsigned char *)pstrcat(r->pool, a1, ":", h->nonce, ":",
! md5(r->pool,
! (unsigned char *)pstrcat(r->pool,r->method,":",
! h->requested_uri,NULL)),
! NULL));
}
/* These functions return 0 if client is OK, and proper error status
1.3 +4 -3 apache/src/util_md5.c
Index: util_md5.c
===================================================================
RCS file: /export/home/cvs/apache/src/util_md5.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C3 -r1.2 -r1.3
*** util_md5.c 1996/03/22 01:05:24 1.2
--- util_md5.c 1996/03/26 19:05:24 1.3
***************
*** 165,172 ****
p = encodedDigest;
for (i=0; i < sizeof(digest); i+=3) {
*p++ = basis_64[digest[i]>>2];
! *p++ = basis_64[((digest[i] & 0x3)<<4) | ((digest[i+1] & 0xF0)>>4)];
! *p++ = basis_64[((digest[i+1] & 0xF)<<2) | ((digest[i+2] & 0xC0)>>6)];+ *p++ = basis_64[digest[i+2] & 0x3F];
}
*p-- = '\0';
*p-- = '=';
--- 165,173 ----
p = encodedDigest;
for (i=0; i < sizeof(digest); i+=3) {
*p++ = basis_64[digest[i]>>2];
! *p++ = basis_64[((digest[i] & 0x3)<<4) | ((int)(digest[i+1] & 0xF0)>>4)];
! *p++ = basis_64[((digest[i+1] & 0xF)<<2) | ((int)(digest[i+2] & 0xC0)>>6)];
! *p++ = basis_64[digest[i+2] & 0x3F];
}
*p-- = '\0';
*p-- = '=';
***************
*** 177,183 ****
char *md5digest(pool *p, FILE *infile)
{
MD5_CTX context;
! char buf[1000];
long length = 0;
int nbytes;
--- 178,184 ----
char *md5digest(pool *p, FILE *infile)
{
MD5_CTX context;
! unsigned char buf[1000];
long length = 0;
int nbytes;