Add the new nsPK11DB.cpp file to the Mac project.

This commit is contained in:
javi%netscape.com 2001-02-08 00:41:42 +00:00
Родитель f8cf11c910
Коммит 04184f460b
2 изменённых файлов: 13 добавлений и 2 удалений

Двоичные данные
security/manager/ssl/macbuild/PIPNSS.mcp

Двоичный файл не отображается.

Просмотреть файл

@ -208,11 +208,13 @@ nsNSSComponent::InitializePIPNSSBundle()
return rv;
}
#define SECURITY_FOLDER ":Security"
nsresult
nsNSSComponent::InitializeNSS()
{
nsresult rv;
nsXPIDLCString profileStr;
char *profileStr;
nsCOMPtr<nsIFile> profilePath;
if (mNSSInitialized) {
@ -230,12 +232,21 @@ nsNSSComponent::InitializeNSS()
return rv;
}
rv = profilePath->GetPath(getter_Copies(profileStr));
rv = profilePath->GetPath(&profileStr);
if (NS_FAILED(rv))
return rv;
PK11_SetPasswordFunc(PK11PasswordPrompt);
#ifdef XP_MAC
size_t allocLen = PL_strlen(profileStr) + PL_strlen(SECURITY_FOLDER) + 1;
char *newString = (char*)nsMemory::Alloc(allocLen);
memcpy(newString, profileStr, PL_strlen(profileStr)+1);
PL_strcat(newString, SECURITY_FOLDER);
nsMemory::Free(profileStr);
profileStr = newString;
#endif
NSS_InitReadWrite(profileStr);
nsMemory::Free(profileStr);
NSS_SetDomesticPolicy();
// SSL_EnableCipher(SSL_RSA_WITH_NULL_MD5, SSL_ALLOWED);