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
NamestringCommon name of the subject.
EmailstringE-mail address in the certificate, when present.
CpfstringCPF of the holder, digits only, when the certificate is an ICP-Brasil one.
CnpjstringCNPJ of the company, digits only, when the certificate was issued to one.
CompanyNamestringName 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
CompanyName
Name of the company, when the certificate was issued to one.
public string? CompanyName { get; init; }
Property Value
Cpf
CPF of the holder, digits only, when the certificate is an ICP-Brasil one.
public string? Cpf { get; init; }
Property Value
E-mail address in the certificate, when present.
public string? Email { get; init; }
Property Value
Name
Common name of the subject.
public string? Name { get; init; }