Bug 497832: Restore const keyword on char*s in nsMyTrustedEVInfo struct, to reduce compiler spam. r=kaie

This commit is contained in:
Daniel Holbert 2009-06-13 22:09:38 -07:00
parent 59bfeb371e
commit 81ff957c42

View File

@ -70,13 +70,13 @@ NSSCleanupAutoPtrClass_WithParam(SECItem, SECITEM_FreeItem, TrueParam, PR_TRUE)
struct nsMyTrustedEVInfo
{
char *dotted_oid;
char *oid_name; // Set this to null to signal an invalid structure,
const char *dotted_oid;
const char *oid_name; // Set this to null to signal an invalid structure,
// (We can't have an empty list, so we'll use a dummy entry)
SECOidTag oid_tag;
char *ev_root_sha1_fingerprint;
char *issuer_base64;
char *serial_base64;
const char *ev_root_sha1_fingerprint;
const char *issuer_base64;
const char *serial_base64;
CERTCertificate *cert;
};
@ -454,11 +454,12 @@ nsMyTrustedEVInfoClass::nsMyTrustedEVInfoClass()
nsMyTrustedEVInfoClass::~nsMyTrustedEVInfoClass()
{
free(dotted_oid);
free(oid_name);
free(ev_root_sha1_fingerprint);
free(issuer_base64);
free(serial_base64);
// Cast away const-ness in order to free these strings
free(const_cast<char*>(dotted_oid));
free(const_cast<char*>(oid_name));
free(const_cast<char*>(ev_root_sha1_fingerprint));
free(const_cast<char*>(issuer_base64));
free(const_cast<char*>(serial_base64));
if (cert)
CERT_DestroyCertificate(cert);
}