EasySign BETA
Digital Signing Tool
|
Represents the configuration for the EasySign command provider. More...
Public Member Functions | |
CommandProviderConfiguration () | |
Initializes a new instance of the CommandProviderConfiguration class. | |
CommandProviderConfiguration (string[] protectedPrefixes) | |
Initializes a new instance of the CommandProviderConfiguration class with the specified protected prefixes. | |
bool | IsProtected (string id) |
Checks if the given ID starts with any of the protected prefixes. | |
void | AddProtectedPrefix (params string[] prefixes) |
Adds given prefixes to the list of Protected ID Prefixes. | |
void | AddSAPTeamCertificates () |
Adds the SAP Team certificates to the trusted root CA and intermediate CA stores and Locks the sapteam: prefix. | |
string | AddCertificate (CertificateStore certificateStore, X509Certificate2 certificate, string? id=null) |
Adds a certificate to the specified certificate store. | |
X509Certificate2Collection | LoadCertificates (CertificateStore certificateStore) |
Loads all certificates from the specified certificate store. | |
X509Certificate2 | LoadCertificate (CertificateStore certificateStore, string id) |
Loads a certificate from the specified certificate store using the given ID. | |
bool | RemoveCertificate (CertificateStore certificateStore, string id) |
Removes a certificate from the specified certificate store using the given ID. | |
Protected Member Functions | |
void | CheckProtectedPrefix (string id) |
Checks if the given ID starts with any of the protected prefixes. | |
Properties | |
Dictionary< string, bool > | Settings [get, set] |
Gets or sets the settings for the command provider. | |
string[] | ProtectedPrefixes = [] [get, set] |
Gets or sets the list of prefixes that should be protected from modification. | |
Dictionary< string, byte[]> | TrustedRootCA = [] [get, set] |
Gets or sets the list of trusted root CA certificates. | |
Dictionary< string, byte[]> | IntermediateCA = [] [get, set] |
Gets or sets the list of intermediate CA certificates. | |
Dictionary< string, byte[]> | IssuedCertificates = [] [get, set] |
Gets or sets the list of issued certificates by the self signing root CA. | |
byte?[] | SelfSignedRootCA = null [get, set] |
Gets or sets the self-signed root CA certificate. | |
Represents the configuration for the EasySign command provider.
Definition at line 14 of file CommandProviderConfiguration.cs.
SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CommandProviderConfiguration | ( | ) |
Initializes a new instance of the CommandProviderConfiguration class.
Definition at line 53 of file CommandProviderConfiguration.cs.
SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CommandProviderConfiguration | ( | string[] | protectedPrefixes | ) |
Initializes a new instance of the CommandProviderConfiguration class with the specified protected prefixes.
IDs with these prefixes cannot be modified in the trusted root CA and intermediate CA stores with the AddCertificate(CertificateStore, X509Certificate2, string?) and RemoveCertificate(CertificateStore, string) methods.
protectedPrefixes | The prefixes that should be protected from modification. |
Definition at line 67 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddProtectedPrefix().
string SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddCertificate | ( | CertificateStore | certificateStore, |
X509Certificate2 | certificate, | ||
string? | id = null ) |
Adds a certificate to the specified certificate store.
certificateStore | The certificate store to which the certificate will be added. |
certificate | The certificate to add. |
id | The ID of the certificate. If not provided, the last 6 characters of the certificate's thumbprint will be used. |
ArgumentOutOfRangeException |
Definition at line 145 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CheckProtectedPrefix(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IntermediateCA, SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IssuedCertificates, and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.TrustedRootCA.
void SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddProtectedPrefix | ( | params string[] | prefixes | ) |
Adds given prefixes to the list of Protected ID Prefixes.
prefixes | The prefixes to add. |
ArgumentNullException |
Definition at line 108 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.ProtectedPrefixes.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddSAPTeamCertificates(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CommandProviderConfiguration().
void SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddSAPTeamCertificates | ( | ) |
Adds the SAP Team certificates to the trusted root CA and intermediate CA stores and Locks the sapteam: prefix.
Definition at line 121 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddProtectedPrefix(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IntermediateCA, and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.TrustedRootCA.
|
protected |
Checks if the given ID starts with any of the protected prefixes.
id | The ID to check. |
InvalidOperationException |
Definition at line 79 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IsProtected().
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddCertificate(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.RemoveCertificate().
bool SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IsProtected | ( | string | id | ) |
Checks if the given ID starts with any of the protected prefixes.
id | The ID to check. |
true
if the ID is protected; otherwise, false
. Definition at line 96 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.ProtectedPrefixes.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CheckProtectedPrefix().
X509Certificate2 SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificate | ( | CertificateStore | certificateStore, |
string | id ) |
Loads a certificate from the specified certificate store using the given ID.
certificateStore | The certificate store from which to load the certificate. |
id | The ID of the certificate to load. |
ArgumentOutOfRangeException |
Definition at line 225 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IntermediateCA, SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IssuedCertificates, and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.TrustedRootCA.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificates().
X509Certificate2Collection SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificates | ( | CertificateStore | certificateStore | ) |
Loads all certificates from the specified certificate store.
certificateStore | The certificate store from which to load the certificates. |
ArgumentOutOfRangeException |
Definition at line 183 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IntermediateCA, SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IssuedCertificates, SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificate(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.TrustedRootCA.
bool SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.RemoveCertificate | ( | CertificateStore | certificateStore, |
string | id ) |
Removes a certificate from the specified certificate store using the given ID.
certificateStore | The certificate store from which to remove the certificate. |
id | The ID of the certificate to remove. |
true
if the certificate was removed successfully; otherwise, false
. ArgumentOutOfRangeException |
Definition at line 262 of file CommandProviderConfiguration.cs.
References SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.CheckProtectedPrefix(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IntermediateCA, SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IssuedCertificates, and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.TrustedRootCA.
|
getset |
Gets or sets the list of intermediate CA certificates.
Definition at line 38 of file CommandProviderConfiguration.cs.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddSAPTeamCertificates(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificates(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.RemoveCertificate().
|
getset |
Gets or sets the list of issued certificates by the self signing root CA.
Definition at line 43 of file CommandProviderConfiguration.cs.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificates(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.RemoveCertificate().
|
getsetprotected |
Gets or sets the list of prefixes that should be protected from modification.
Definition at line 28 of file CommandProviderConfiguration.cs.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddProtectedPrefix(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.IsProtected().
|
getset |
Gets or sets the self-signed root CA certificate.
Definition at line 48 of file CommandProviderConfiguration.cs.
|
getset |
Gets or sets the settings for the command provider.
Definition at line 19 of file CommandProviderConfiguration.cs.
|
getset |
Gets or sets the list of trusted root CA certificates.
Definition at line 33 of file CommandProviderConfiguration.cs.
Referenced by SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.AddSAPTeamCertificates(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificate(), SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.LoadCertificates(), and SAPTeam.EasySign.CommandLine.CommandProviderConfiguration.RemoveCertificate().