File nss-CC-internals_access.patch of Package mozilla-nss.972
# HG changeset patch
# Parent a5c4bd17a5ad050b15139bc465c3dbdc770557cd
Allow access to NSS internals for the purpose of CAVS tests
diff --git a/lib/freebl/fips.c b/lib/freebl/fips.c
--- a/lib/freebl/fips.c
+++ b/lib/freebl/fips.c
@@ -62,16 +62,28 @@ FIPS_rngDev(void)
case 1:
return RNG_DEV_FIPS1;
default:
fatal("Fatal error: internal error at %s:%u"
, __FILE__, __LINE__);
}
}
+/* access to internal global variables of FreeBL */
+void *
+FREEBL_GetGlobalVar(int which, void *data)
+{
+ void *rv = NULL;
+
+ switch (which) {
+ default:
+ break;
+ }
+ return rv;
+}
/* either returns the input or aborts if in FIPS and the algorithm is not
* approved */
PRBool
FIPS_hashAlgApproved(HASH_HashType hashAlg)
{
PRBool rv = PR_FALSE;
switch (hashAlg) {
diff --git a/lib/freebl/fips.h b/lib/freebl/fips.h
--- a/lib/freebl/fips.h
+++ b/lib/freebl/fips.h
@@ -18,10 +18,12 @@
return rv; \
} \
} while (0)
int FIPS_mode(void);
char* FIPS_rngDev(void);
PRBool FIPS_hashAlgApproved(HASH_HashType hashAlg);
+void* FREEBL_GetGlobalVar(int which, void *data);
+
#endif
diff --git a/lib/freebl/freebl.def b/lib/freebl/freebl.def
--- a/lib/freebl/freebl.def
+++ b/lib/freebl/freebl.def
@@ -16,11 +16,12 @@
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+
;+NSSprivate_3.11 { # NSS 3.11 release
;+ global:
LIBRARY freebl3 ;-
EXPORTS ;-
FREEBL_GetVector;
+FREEBL_GetGlobalVar;
;+ local:
;+ *;
;+};
diff --git a/lib/freebl/freebl_hash.def b/lib/freebl/freebl_hash.def
--- a/lib/freebl/freebl_hash.def
+++ b/lib/freebl/freebl_hash.def
@@ -16,16 +16,17 @@
;+# This file is passed directly to windows. Since ';' is a comment, all UNIX
;+# directives are hidden behind ";", ";+", and ";-"
;+
;+NSSprivate_3.11 { # NSS 3.11 release
;+ global:
LIBRARY freebl3 ;-
EXPORTS ;-
FREEBL_GetVector;
+FREEBL_GetGlobalVar;
;+ local:
;+ *;
;+};
;+NSSRAWHASH_3.12.3 { # NSS 3.12.3 release
;+ global:
NSSLOW_Init;
NSSLOW_Shutdown;
NSSLOWHASH_Length;