if((flags & PKCS7_DETACHED) && data) {
/* We want multipart/signed */
/* Generate a random boundary */
- RAND_bytes((unsigned char *)bound, 32);
+ RAND_pseudo_bytes((unsigned char *)bound, 32);
for(i = 0; i < 32; i++) {
c = bound[i] & 0xf;
if(c < 10) c += '0';
headers = sk_new(mime_hdr_cmp);
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
/* If whitespace at line start then continuation line */
- if(mhdr && isspace(linebuf[0])) state = MIME_NAME;
+ if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;
else state = MIME_START;
ntmp = NULL;
/* Go through all characters */
/* Else null string */
return NULL;
}
- if(!isspace(c)) return p;
+ if(!isspace((unsigned char)c)) return p;
}
return NULL;
}
*p = 0;
return name;
}
- if(isspace(c)) *p = 0;
+ if(isspace((unsigned char)c)) *p = 0;
else return name;
}
return NULL;
tmpval = BUF_strdup(value);
if(!tmpval) return 0;
} else tmpval = NULL;
- /* Paramter values are case sensitive so leave as is */
+ /* Parameter values are case sensitive so leave as is */
mparam = (MIME_PARAM *) Malloc(sizeof(MIME_PARAM));
if(!mparam) return 0;
mparam->param_name = tmpname;
if(hdr->name) Free(hdr->name);
if(hdr->value) Free(hdr->value);
if(hdr->params) sk_pop_free(hdr->params, mime_param_free);
- Free((char *)hdr);
+ Free(hdr);
}
static void mime_param_free(MIME_PARAM *param)
{
if(param->param_name) Free(param->param_name);
if(param->param_value) Free(param->param_value);
- Free((char *)param);
+ Free(param);
}
/* Check for a multipart boundary. Returns: