.NET Based OPC UA Client/Server SDK
3.0.0.439
|
Provides various security related functions. More...
Static Public Member Functions | |
static bool | IsWindowStorePath (string storePath) |
Determines whether the store path points to a windows certificate store. More... | |
static ICertificate | LoadCertificate (byte[] bytes, bool extractIssuers=false) |
Initializes a certificate with the DER encoded bytes. More... | |
static ICertificate | LoadCertificate (byte[] bytes, string password) |
Initializes a certificate with the DER encoded bytes. More... | |
static ICertificate | LoadCertificate (System.Security.Cryptography.X509Certificates.X509Certificate2 x509) |
Initializes a certificate with an x509 certificate. More... | |
static ICertificate[] | LoadCertificateChain (byte[] bytes) |
Loads any certificate chain which has been appended the certificate in the byte buffer. More... | |
static byte[] | GetNonce (int length) |
Returns a new nonce. More... | |
static byte[] | Concat (params byte[][] arrays) |
Concatinates a list of byte arrays. More... | |
static byte[] | PSHA1 (byte[] secret, string label, byte[] data, int offset, int length) |
Generates a Pseudo random sequence of bits using the P_SHA1 alhorithm. More... | |
static byte[] | PSHA256 (byte[] secret, string label, byte[] data, int offset, int length) |
Generates a Pseudo random sequence of bits using the P_SHA1 alhorithm. More... | |
static List< string > | ParseDistinguishedName (string name) |
Parses a distingushed name. More... | |
static bool | FindStringIgnoreCase (IList< string > strings, string target) |
Checks if the target is in the list. Comparisons ignore case. More... | |
static bool | AreDomainsEqual (string domain1, string domain2) |
Checks if the domains are equal. More... | |
static IList< string > | GetDomainsFromCertficate (X509Certificate2 certificate) |
Extracts the the DNS names specified in the certificate. More... | |
static ICertificateStore | CreateStore (ISecurityProvider provider, string storePath, bool readOnly=false, bool noPrivateKeys=false) |
Creates a new certificate store instance. More... | |
static SignatureData | Sign (ISecurityProvider provider, string securityPolicyUri, ICertificate signingCertificate, byte[] dataToSign) |
Creates a signature with the private key of a certificate. More... | |
static bool | Verify (ISecurityProvider provider, string securityPolicyUri, ICertificate signingCertificate, byte[] dataToSign, SignatureData signature) |
Verifies a signature with the public key of a certificate. More... | |
static string | GetApplicationUriFromCertficate (X509Certificate2 certificate) |
Extracts the the application URI specified in the certificate. More... | |
static bool | DoesUrlMatchCertificate (X509Certificate2 certificate, Uri endpointUrl) |
Checks that the domain in the URL provided matches one of the domains in the certificate. More... | |
static bool | CompareDistinguishedName (string name1, string name2) |
Compares two distinguished names. More... | |
static bool | CompareDistinguishedName (X509Certificate2 certificate, List< string > parsedName) |
Compares two distinguished names. More... | |
static string | ChangeSubjectNameDelimiter (string name, char delimiter) |
Changes the delimiter used to seperate fields in a subject name. More... | |
static bool | CheckIfProcessHasAdminRights () |
Checks if the process has admin rights. More... | |
static HashAlgorithm | GetHashAlgorithm (ICertificate certificate) |
Gets the hash algorithm for the certificate. More... | |
static ushort | GetHashSize (HashAlgorithm algorithm) |
Gets the hash size for the hash algorithm. More... | |
static ushort | GetHashSize (ICertificate certificate) |
Gets the hash size for the certificate. More... | |
static PublicKeyAlgorithm | GetPublicKeyAlgorithm (ICertificate certificate) |
Gets the public key algorithm for the certificate. More... | |
static ushort | GetPublicKeySize (PublicKeyAlgorithm algorithm) |
Gets the key size for the public key algorithm. More... | |
static ushort | GetPublicKeySize (ICertificate certificate) |
Gets the key size for the certificate. More... | |
static bool | DoesCertificateSupportSecurityPolicy (ICertificate certificate, string securityPolicyUri) |
Checks if the certificate supports the security policy. More... | |
Provides various security related functions.
|
inlinestatic |
Checks if the domains are equal.
domain1 | The first domain to compare. |
domain2 | The second domain to compare. |
|
inlinestatic |
Changes the delimiter used to seperate fields in a subject name.
|
inlinestatic |
Checks if the process has admin rights.
|
inlinestatic |
Compares two distinguished names.
|
inlinestatic |
Compares two distinguished names.
|
inlinestatic |
Concatinates a list of byte arrays.
arrays | The arrays. |
|
inlinestatic |
Creates a new certificate store instance.
provider | The security provider. |
storePath | The path to the certificate store. |
readOnly | TRUE if the store is read only; FALSE otherwise. |
noPrivateKeys | TRUE if private keys should not be loaded into the store; FALSE otherwise. |
|
inlinestatic |
Checks if the certificate supports the security policy.
certificate | The certificate. |
securityPolicyUri | The security policy URI. |
|
inlinestatic |
Checks that the domain in the URL provided matches one of the domains in the certificate.
certificate | The certificate. |
endpointUrl | The endpoint url to verify. |
|
inlinestatic |
Checks if the target is in the list. Comparisons ignore case.
|
inlinestatic |
Extracts the the application URI specified in the certificate.
certificate | The certificate. |
|
inlinestatic |
Extracts the the DNS names specified in the certificate.
certificate | The certificate. |
|
inlinestatic |
Gets the hash algorithm for the certificate.
certificate | The certificate. |
|
inlinestatic |
Gets the hash size for the hash algorithm.
algorithm | The hash algorithm. |
|
inlinestatic |
Gets the hash size for the certificate.
certificate | The certificate. |
|
inlinestatic |
Returns a new nonce.
length | The length of the nonce. |
|
inlinestatic |
Gets the public key algorithm for the certificate.
certificate | The certificate. |
|
inlinestatic |
Gets the key size for the public key algorithm.
algorithm | The public key algorithm. |
|
inlinestatic |
Gets the key size for the certificate.
certificate | The certificate. |
|
inlinestatic |
Determines whether the store path points to a windows certificate store.
storePath | The store path. |
true
if the store path points to a windows certificate store; otherwise, false
.
|
inlinestatic |
Initializes a certificate with the DER encoded bytes.
bytes | The DER encoded blob. |
extractIssuers | TRUE if the issuers should be extracted from the blob. |
|
inlinestatic |
Initializes a certificate with the DER encoded bytes.
bytes | The bytes. |
password | The password. |
|
inlinestatic |
Initializes a certificate with an x509 certificate.
x509 | The x509 used to initialize the certificate object. |
|
inlinestatic |
Loads any certificate chain which has been appended the certificate in the byte buffer.
bytes | The bytes. |
|
inlinestatic |
Parses a distingushed name.
|
inlinestatic |
Generates a Pseudo random sequence of bits using the P_SHA1 alhorithm.
|
inlinestatic |
Generates a Pseudo random sequence of bits using the P_SHA1 alhorithm.
|
inlinestatic |
Creates a signature with the private key of a certificate.
provider | The security provider. |
securityPolicyUri | The security policy that specifies the cryptography algorithms. |
signingCertificate | The certificate used to create the signature (must have a private key). |
dataToSign | The data to sign. |
|
inlinestatic |
Verifies a signature with the public key of a certificate.
provider | The security provider. |
securityPolicyUri | The security policy that specifies the cryptography algorithms. |
signingCertificate | The certificate used to create the signature. |
dataToSign | The data to sign. |
signature | The signature to verify. |