Bug 794636: CERT_AsciiToName should take a const char * input argument.
r=kaie. Modified Files: alg1485.c cert.h git-svn-id: svn://10.0.0.236/trunk@264278 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f2223d329d
commit
c53b4fdca1
@ -175,9 +175,9 @@ IsPrintable(unsigned char *data, unsigned len)
|
||||
}
|
||||
|
||||
static void
|
||||
skipSpace(char **pbp, char *endptr)
|
||||
skipSpace(const char **pbp, const char *endptr)
|
||||
{
|
||||
char *bp = *pbp;
|
||||
const char *bp = *pbp;
|
||||
while (bp < endptr && OPTIONAL_SPACE(*bp)) {
|
||||
bp++;
|
||||
}
|
||||
@ -185,9 +185,10 @@ skipSpace(char **pbp, char *endptr)
|
||||
}
|
||||
|
||||
static SECStatus
|
||||
scanTag(char **pbp, char *endptr, char *tagBuf, int tagBufSize)
|
||||
scanTag(const char **pbp, const char *endptr, char *tagBuf, int tagBufSize)
|
||||
{
|
||||
char *bp, *tagBufp;
|
||||
const char *bp;
|
||||
char *tagBufp;
|
||||
int taglen;
|
||||
|
||||
PORT_Assert(tagBufSize > 0);
|
||||
@ -232,9 +233,10 @@ scanTag(char **pbp, char *endptr, char *tagBuf, int tagBufSize)
|
||||
|
||||
/* Returns the number of bytes in the value. 0 means failure. */
|
||||
static int
|
||||
scanVal(char **pbp, char *endptr, char *valBuf, int valBufSize)
|
||||
scanVal(const char **pbp, const char *endptr, char *valBuf, int valBufSize)
|
||||
{
|
||||
char *bp, *valBufp;
|
||||
const char *bp;
|
||||
char *valBufp;
|
||||
int vallen = 0;
|
||||
PRBool isQuoted;
|
||||
|
||||
@ -358,11 +360,11 @@ loser:
|
||||
* points to first character after separator.
|
||||
*/
|
||||
static CERTAVA *
|
||||
ParseRFC1485AVA(PRArenaPool *arena, char **pbp, char *endptr)
|
||||
ParseRFC1485AVA(PRArenaPool *arena, const char **pbp, const char *endptr)
|
||||
{
|
||||
CERTAVA *a;
|
||||
const NameToKind *n2k;
|
||||
char *bp;
|
||||
const char *bp;
|
||||
int vt = -1;
|
||||
int valLen;
|
||||
SECOidTag kind = SEC_OID_UNKNOWN;
|
||||
@ -446,11 +448,11 @@ loser:
|
||||
}
|
||||
|
||||
static CERTName *
|
||||
ParseRFC1485Name(char *buf, int len)
|
||||
ParseRFC1485Name(const char *buf, int len)
|
||||
{
|
||||
SECStatus rv;
|
||||
CERTName *name;
|
||||
char *bp, *e;
|
||||
const char *bp, *e;
|
||||
CERTAVA *ava;
|
||||
CERTRDN *rdn = NULL;
|
||||
|
||||
@ -516,7 +518,7 @@ ParseRFC1485Name(char *buf, int len)
|
||||
}
|
||||
|
||||
CERTName *
|
||||
CERT_AsciiToName(char *string)
|
||||
CERT_AsciiToName(const char *string)
|
||||
{
|
||||
CERTName *name;
|
||||
name = ParseRFC1485Name(string, PORT_Strlen(string));
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
/*
|
||||
* cert.h - public data structures and prototypes for the certificate library
|
||||
*
|
||||
* $Id: cert.h,v 1.90 2012-09-19 15:08:07 kaie%kuix.de Exp $
|
||||
* $Id: cert.h,v 1.91 2012-09-28 16:05:02 wtc%google.com Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CERT_H_
|
||||
@ -34,7 +34,7 @@ SEC_BEGIN_PROTOS
|
||||
/*
|
||||
** Convert an ascii RFC1485 encoded name into its CERTName equivalent.
|
||||
*/
|
||||
extern CERTName *CERT_AsciiToName(char *string);
|
||||
extern CERTName *CERT_AsciiToName(const char *string);
|
||||
|
||||
/*
|
||||
** Convert an CERTName into its RFC1485 encoded equivalent.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user