mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
update NSS as-of pm27 rev 7606140ee
This commit is contained in:
parent
eeb44de4a1
commit
8015bb7004
24 changed files with 1005 additions and 1400 deletions
|
|
@ -55,16 +55,26 @@ SECU_ReadDERFromFile(SECItem *der, PRFileDesc *inFile, PRBool ascii)
|
|||
if (ascii) {
|
||||
/* First convert ascii to binary */
|
||||
SECItem filedata;
|
||||
char *asc, *body;
|
||||
|
||||
/* Read in ascii data */
|
||||
rv = SECU_FileToItem(&filedata, inFile);
|
||||
asc = (char *)filedata.data;
|
||||
if (!asc) {
|
||||
if (rv != SECSuccess) {
|
||||
return rv;
|
||||
}
|
||||
if (!filedata.data) {
|
||||
fprintf(stderr, "unable to read data from input file\n");
|
||||
return SECFailure;
|
||||
}
|
||||
/* need one additional byte for zero terminator */
|
||||
rv = SECITEM_ReallocItemV2(NULL, &filedata, filedata.len + 1);
|
||||
if (rv != SECSuccess) {
|
||||
PORT_Free(filedata.data);
|
||||
return rv;
|
||||
}
|
||||
char *asc = (char *)filedata.data;
|
||||
asc[filedata.len - 1] = '\0';
|
||||
|
||||
char *body;
|
||||
/* check for headers and trailers and remove them */
|
||||
if ((body = strstr(asc, "-----BEGIN")) != NULL) {
|
||||
char *trailer = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue