Changes to deal with exporting data from Windows DLLs.
authornelsonb%netscape.com
Tue, 19 Jun 2012 05:46:50 +0000
changeset 10381 1dfcacd577da0aceaef4b24d2e75bcbcc060ba5e
parent 10380 4492b9aa385cfa2c4825ac7cc58c1ca0f34d24bc
child 10382 769bfbf2f6352712b6794cdd145aeed6dc9b449d
push idunknown
push userunknown
push dateunknown
Changes to deal with exporting data from Windows DLLs. SECHashObjects[] is no longer exported. New function HASH_GetHashObject returns pointer to selected const object. SSL statistics are now in a structure whose address is obtained via a call to SSL_GetStatistics(). On NT, the new symbol NSS_USE_STATIC_LIBS must be declared in programs that use the static SSL library. Also, propagate "const" declaration for SECHashObjects.
security/nss/lib/util/hasht.h
--- a/security/nss/lib/util/hasht.h
+++ b/security/nss/lib/util/hasht.h
@@ -70,18 +70,24 @@ struct SECHashObjectStr {
     void * (*clone)(void *);
     void (*destroy)(void *, PRBool);
     void (*begin)(void *);
     void (*update)(void *, const unsigned char *, unsigned int);
     void (*end)(void *, unsigned char *, unsigned int *, unsigned int);
 };
 
 struct HASHContextStr {
-    struct SECHashObjectStr *hashobj;
+    const struct SECHashObjectStr *hashobj;
     void *hash_context;
 };
 
-extern SECHashObject SECHashObjects[];
+/* This symbol is NOT exported from the NSS DLL.  Code that needs a 
+ * pointer to one of the SECHashObjects should call HASH_GetHashObject()
+ * instead. See "sechash.h".
+ */
+extern const SECHashObject SECHashObjects[];
 
-/*only those functions below the PKCS #11 line should use SECRawHashObjects*/
-extern SECHashObject SECRawHashObjects[];
+/* Only those functions below the PKCS #11 line should use SECRawHashObjects.
+ * This symbol is not exported from the NSS DLL.
+ */
+extern const SECHashObject SECRawHashObjects[];
 
 #endif /* _HASHT_H_ */