Mercurial > trustbridge
comparison cinst/mozilla.c @ 595:2c4eb4435a40
Set trust also for S/MIME and Codesigning
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 28 May 2014 09:07:10 +0000 |
parents | f115da3645d5 |
children | 2303caf56dbb |
comparison
equal
deleted
inserted
replaced
594:c944de9900de | 595:2c4eb4435a40 |
---|---|
440 DEBUGPRINTF("INSTALLING cert: '%s' to: %s\n", cert_name, pdir); | 440 DEBUGPRINTF("INSTALLING cert: '%s' to: %s\n", cert_name, pdir); |
441 pk11slot = PK11_GetInternalKeySlot(); | 441 pk11slot = PK11_GetInternalKeySlot(); |
442 cert = CERT_DecodeCertFromPackage((char *)dercert->data, | 442 cert = CERT_DecodeCertFromPackage((char *)dercert->data, |
443 (int)dercert->len); | 443 (int)dercert->len); |
444 trust = (CERTCertTrust *)xmalloc(sizeof(CERTCertTrust)); | 444 trust = (CERTCertTrust *)xmalloc(sizeof(CERTCertTrust)); |
445 CERT_DecodeTrustString(trust, "C"); | 445 CERT_DecodeTrustString(trust, "C,C,C"); |
446 if ((PK11_ImportCert(pk11slot, cert, CK_INVALID_HANDLE, | 446 if ((PK11_ImportCert(pk11slot, cert, CK_INVALID_HANDLE, |
447 cert_name, PR_FALSE) | 447 cert_name, PR_FALSE) |
448 == SECSuccess) && | 448 == SECSuccess) && |
449 (CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), cert, trust) | 449 (CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), cert, trust) |
450 == SECSuccess)) | 450 == SECSuccess)) |