Allow 'importing' certificates that already exist in the database.

Use the import to change the trust flags on the given certificate.
This commit is contained in:
relyea%netscape.com 2001-09-04 20:19:26 +00:00
Родитель 0d43d3b12b
Коммит 81ec537252
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -667,9 +667,13 @@ pk11_handleCertObject(PK11Session *session,PK11Object *object)
!= SECSuccess) {
return CKR_ATTRIBUTE_VALUE_INVALID;
}
if (!cert->isperm) {
if (CERT_AddTempCertToPerm(cert, label, &trust) != SECSuccess) {
return CKR_HOST_MEMORY;
}
} else {
CERT_ChangeCertTrust(cert->dbhandle,cert,&trust);
}
if(certUsage) {
if(CERT_ChangeCertTrustByUsage(CERT_GetDefaultCertDB(),
cert, *certUsage) != SECSuccess) {