Table of Contents

Class CertificateSubject

Namespace
NuvTools.Security.Certificate
Assembly
NuvTools.Security.dll

Who a validated certificate was issued to.

public sealed record CertificateSubject : IEquatable<CertificateSubject>
Inheritance
CertificateSubject
Implements
Inherited Members

Remarks

Every value comes from the certificate itself. Which of them an application requires is its own decision: a certificate issued to a company carries a CNPJ and the CPF of the person responsible, one issued to a person may carry no CNPJ, and one from outside ICP-Brasil carries neither.

Constructors

CertificateSubject(string?, string?, string?, string?, string?)

Who a validated certificate was issued to.

public CertificateSubject(string? Name, string? Email, string? Cpf, string? Cnpj, string? CompanyName)

Parameters

Name string

Common name of the subject.

Email string

E-mail address in the certificate, when present.

Cpf string

CPF of the holder, digits only, when the certificate is an ICP-Brasil one.

Cnpj string

CNPJ of the company, digits only, when the certificate was issued to one.

CompanyName string

Name of the company, when the certificate was issued to one.

Remarks

Every value comes from the certificate itself. Which of them an application requires is its own decision: a certificate issued to a company carries a CNPJ and the CPF of the person responsible, one issued to a person may carry no CNPJ, and one from outside ICP-Brasil carries neither.

Properties

Cnpj

CNPJ of the company, digits only, when the certificate was issued to one.

public string? Cnpj { get; init; }

Property Value

string

CompanyName

Name of the company, when the certificate was issued to one.

public string? CompanyName { get; init; }

Property Value

string

Cpf

CPF of the holder, digits only, when the certificate is an ICP-Brasil one.

public string? Cpf { get; init; }

Property Value

string

Email

E-mail address in the certificate, when present.

public string? Email { get; init; }

Property Value

string

Name

Common name of the subject.

public string? Name { get; init; }

Property Value

string