Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / net / third_party / nss / patches / secitemarray.patch
blob136f3e44563839ddae0b2def727d5f3e8b183180
1 diff --git a/ssl/sslimpl.h b/ssl/sslimpl.h
2 index 0ece0ed..ea71975 100644
3 --- a/ssl/sslimpl.h
4 +++ b/ssl/sslimpl.h
5 @@ -1373,6 +1373,15 @@ extern sslSessionIDUncacheFunc ssl_sid_uncache;
7 SEC_BEGIN_PROTOS
9 +/* Functions for handling SECItemArrays, added in NSS 3.15 */
10 +extern SECItemArray *SECITEM_AllocArray(PLArenaPool *arena,
11 + SECItemArray *array,
12 + unsigned int len);
13 +extern SECItemArray *SECITEM_DupArray(PLArenaPool *arena,
14 + const SECItemArray *from);
15 +extern void SECITEM_FreeArray(SECItemArray *array, PRBool freeit);
16 +extern void SECITEM_ZfreeArray(SECItemArray *array, PRBool freeit);
18 /* Internal initialization and installation of the SSL error tables */
19 extern SECStatus ssl_Init(void);
20 extern SECStatus ssl_InitializePRErrorTable(void);
21 diff --git a/ssl/sslt.h b/ssl/sslt.h
22 index 0900f28..430d216 100644
23 --- a/ssl/sslt.h
24 +++ b/ssl/sslt.h
25 @@ -10,6 +10,19 @@
27 #include "prtypes.h"
29 +/* SECItemArray is added in NSS 3.15. Define the type if compiling
30 +** against an older version of NSS.
31 +*/
32 +#include "nssutil.h"
33 +#if NSSUTIL_VMAJOR == 3 && NSSUTIL_VMINOR < 15
34 +typedef struct SECItemArrayStr SECItemArray;
36 +struct SECItemArrayStr {
37 + SECItem *items;
38 + unsigned int len;
39 +};
40 +#endif /* NSSUTIL_VMAJOR == 3 && NSSUTIL_VMINOR < 15 */
42 typedef struct SSL3StatisticsStr {
43 /* statistics from ssl3_SendClientHello (sch) */
44 long sch_sid_cache_hits;