33 references to TrustLevel
Templates.Tests (33)
src\Shared\CertificateGeneration\CertificateManager.cs (9)
394var trustLevel = TrustCertificate(certificate); 397case TrustLevel.Full: 400case TrustLevel.Partial: 403case TrustLevel.None: 520public abstract TrustLevel GetTrustLevel(X509Certificate2 certificate); 524/// <remarks>Implementations may choose to throw, rather than returning <see cref="TrustLevel.None"/>.</remarks> 525protected abstract TrustLevel TrustCertificateCore(X509Certificate2 certificate); 751internal TrustLevel TrustCertificate(X509Certificate2 certificate) 759var trustLevel = TrustCertificateCore(certificate);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (8)
85protected override TrustLevel TrustCertificateCore(X509Certificate2 publicCertificate) 87var oldTrustLevel = GetTrustLevel(publicCertificate); 88if (oldTrustLevel != TrustLevel.None) 90Debug.Assert(oldTrustLevel == TrustLevel.Full); // Mac trust is all or nothing 114return TrustLevel.Full; 151public override TrustLevel GetTrustLevel(X509Certificate2 certificate) 169return checkTrustProcess.ExitCode == 0 ? TrustLevel.Full : TrustLevel.None;
src\Shared\CertificateGeneration\UnixCertificateManager.cs (10)
51public override TrustLevel GetTrustLevel(X509Certificate2 certificate) 147? TrustLevel.Partial 148: TrustLevel.Full 149: TrustLevel.None; 184protected override TrustLevel TrustCertificateCore(X509Certificate2 certificate) 235return TrustLevel.None; 244return TrustLevel.None; 328return TrustLevel.None; 355? TrustLevel.Partial 356: TrustLevel.Full;
src\Shared\CertificateGeneration\WindowsCertificateManager.cs (6)
74protected override TrustLevel TrustCertificateCore(X509Certificate2 certificate) 82return TrustLevel.Full; 92return TrustLevel.Full; 120public override TrustLevel GetTrustLevel(X509Certificate2 certificate) 124return isTrusted ? TrustLevel.Full : TrustLevel.None;