OLD | NEW |
| (Empty) |
1 Index: mozilla/security/nss/lib/util/dertime.c | |
2 =================================================================== | |
3 RCS file: /cvsroot/mozilla/security/nss/lib/util/dertime.c,v | |
4 retrieving revision 1.13 | |
5 diff -u -p -u -8 -r1.13 dertime.c | |
6 --- mozilla/security/nss/lib/util/dertime.c 29 Dec 2009 02:57:28 -0000
1.13 | |
7 +++ mozilla/security/nss/lib/util/dertime.c 21 Jan 2010 22:34:30 -0000 | |
8 @@ -108,17 +108,17 @@ DER_TimeToUTCTimeArena(PRArenaPool* aren | |
9 SECStatus | |
10 DER_TimeToUTCTime(SECItem *dst, int64 gmttime) | |
11 { | |
12 return DER_TimeToUTCTimeArena(NULL, dst, gmttime); | |
13 } | |
14 | |
15 static SECStatus /* forward */ | |
16 der_TimeStringToTime(PRTime *dst, const char *string, int generalized, | |
17 - char **endptr); | |
18 + const char **endptr); | |
19 | |
20 #define GEN_STRING 2 /* TimeString is a GeneralizedTime */ | |
21 #define UTC_STRING 0 /* TimeString is a UTCTime */ | |
22 | |
23 /* The caller of DER_AsciiToItem MUST ENSURE that either | |
24 ** a) "string" points to a null-terminated ASCII string, or | |
25 ** b) "string" points to a buffer containing a valid UTCTime, | |
26 ** whether null terminated or not, or | |
27 @@ -136,17 +136,17 @@ SECStatus | |
28 DER_UTCTimeToTime(int64 *dst, const SECItem *time) | |
29 { | |
30 /* Minimum valid UTCTime is yymmddhhmmZ which is 11 bytes. | |
31 ** Maximum valid UTCTime is yymmddhhmmss+0000 which is 17 bytes. | |
32 ** 20 should be large enough for all valid encoded times. | |
33 */ | |
34 unsigned int i; | |
35 char localBuf[20]; | |
36 - char *end = NULL; | |
37 + const char *end = NULL; | |
38 SECStatus rv; | |
39 | |
40 if (!time || !time->data || time->len < 11 || time->len > 17) { | |
41 PORT_SetError(SEC_ERROR_INVALID_TIME); | |
42 return SECFailure; | |
43 } | |
44 | |
45 for (i = 0; i < time->len; i++) { | |
46 @@ -230,17 +230,17 @@ SECStatus | |
47 DER_GeneralizedTimeToTime(int64 *dst, const SECItem *time) | |
48 { | |
49 /* Minimum valid GeneralizedTime is ccyymmddhhmmZ which is 13 bytes. | |
50 ** Maximum valid GeneralizedTime is ccyymmddhhmmss+0000 which is 19 bytes. | |
51 ** 20 should be large enough for all valid encoded times. | |
52 */ | |
53 unsigned int i; | |
54 char localBuf[20]; | |
55 - char *end = NULL; | |
56 + const char *end = NULL; | |
57 SECStatus rv; | |
58 | |
59 if (!time || !time->data || time->len < 13 || time->len > 19) { | |
60 PORT_SetError(SEC_ERROR_INVALID_TIME); | |
61 return SECFailure; | |
62 } | |
63 | |
64 for (i = 0; i < time->len; i++) { | |
65 @@ -257,17 +257,17 @@ DER_GeneralizedTimeToTime(int64 *dst, co | |
66 PORT_SetError(SEC_ERROR_INVALID_TIME); | |
67 return SECFailure; | |
68 } | |
69 return rv; | |
70 } | |
71 | |
72 static SECStatus | |
73 der_TimeStringToTime(PRTime *dst, const char *string, int generalized, | |
74 - char **endptr) | |
75 + const char **endptr) | |
76 { | |
77 PRExplodedTime genTime; | |
78 long hourOff = 0, minOff = 0; | |
79 uint16 century; | |
80 char signum; | |
81 | |
82 if (string == NULL || dst == NULL) { | |
83 PORT_SetError(SEC_ERROR_INVALID_ARGS); | |
OLD | NEW |