Share via


SecTrust Class

Definition

A trust level. A trust object combines a certificate with a policy or policies.

public class SecTrust : CoreFoundation.NativeObject
type SecTrust = class
    inherit NativeObject
Inheritance

Constructors

Name Description
SecTrust(SecCertificate, SecPolicy)
SecTrust(X509Certificate, SecPolicy)

Create a new instance based on the certificate, to be evaluated, and a policy, to be applied.

SecTrust(X509Certificate2, SecPolicy)

Create a new instance based on the certificate, to be evaluated, and a policy, to be applied

SecTrust(X509Certificate2Collection, SecPolicy)

Create a new instance based on the certificate, to be evaluated, and a policy, to be applied.

SecTrust(X509CertificateCollection, SecPolicy)

Create a new instance based on the certificate, to be evaluated, and a policy, to be applied.

Properties

Name Description
Count

Return the number of certificates used for evaluation.

Handle (Inherited from DisposableObject)
Item[IntPtr]
NetworkFetchAllowed
Owns (Inherited from DisposableObject)

Methods

Name Description
ClearHandle() (Inherited from DisposableObject)
Dispose() (Inherited from DisposableObject)
Dispose(Boolean) (Inherited from NativeObject)
Equals(Object) (Inherited from DisposableObject)
Evaluate()

Evaluate the trust of the certificate using the policy.

Evaluate(DispatchQueue, SecTrustCallback)
Evaluate(DispatchQueue, SecTrustWithErrorCallback)
Evaluate(NSError)
GetCertificateChain()
GetCheckedHandle() (Inherited from DisposableObject)
GetCustomAnchorCertificates()
GetExceptions()
GetHashCode() (Inherited from DisposableObject)
GetKey()
GetPolicies()
GetPublicKey()

Get the public key of the evaluated certificate.

GetResult()
GetTrustResult()
GetTypeID()

Type identifier for the Security.SecTrust type.

GetVerifyTime()

Get the verification time.

InitializeHandle(NativeHandle) (Inherited from DisposableObject)
Release() (Inherited from NativeObject)
Retain() (Inherited from NativeObject)
SetAnchorCertificates(SecCertificate[])
SetAnchorCertificates(X509Certificate2Collection)

Provide your own collection of trusted certificate for the evaluation.

SetAnchorCertificates(X509CertificateCollection)

Provide your own collection of trusted certificate for the evaluation.

SetAnchorCertificatesOnly(Boolean)

Specify if only the supplied anchor certificates should be used.

SetExceptions(NSData)
SetOCSPResponse(IEnumerable<NSData>)
SetOCSPResponse(NSArray)
SetOCSPResponse(NSData)
SetPolicies(IEnumerable<SecPolicy>)
SetPolicies(NSArray)
SetPolicy(SecPolicy)
SetSignedCertificateTimestamps(IEnumerable<NSData>)
SetSignedCertificateTimestamps(NSArray<NSData>)
SetVerifyDate(DateTime)

Set the date at which the trust is to be evaluated.

Extension Methods

Name Description
GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to