Show / Hide Table of Contents

Class SignatureValidator

Validate signatures using a public key.

Inheritance
object
SignatureValidator
SignatureCreator
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.License
Assembly: SoLicense.dll
Syntax
public class SignatureValidator

Constructors

SignatureValidator(SignedPublicKey)

Create a validator using a signed public key

Declaration
public SignatureValidator(SignedPublicKey publicKey)
Parameters
Type Name Description
SignedPublicKey publicKey

The public key must have been signed by the SuperOffice root key

SignatureValidator(SignedPublicKey, ILogger)

Create a validator using a signed public key

Declaration
public SignatureValidator(SignedPublicKey publicKey, ILogger logger)
Parameters
Type Name Description
SignedPublicKey publicKey

The public key must have been signed by the SuperOffice root key

ILogger logger

Fields

_publicKey

Validate signatures using a public key.

Declaration
protected DSAParameters _publicKey
Field Value
Type Description
DSAParameters

_rootPublicKey

Validate signatures using a public key.

Declaration
protected static DSAParameters _rootPublicKey
Field Value
Type Description
DSAParameters

_signedPublicKey

Validate signatures using a public key.

Declaration
protected SignedPublicKey _signedPublicKey
Field Value
Type Description
SignedPublicKey

_testrootPublicKey

Validate signatures using a public key.

Declaration
protected static DSAParameters _testrootPublicKey
Field Value
Type Description
DSAParameters

Properties

PublicKey

Return the public key used by this validator.

Declaration
public SignedPublicKey PublicKey { get; }
Property Value
Type Description
SignedPublicKey

Methods

ComputeHash(LicenseInfo)

Validate signatures using a public key.

Declaration
protected static byte[] ComputeHash(LicenseInfo info)
Parameters
Type Name Description
LicenseInfo info
Returns
Type Description
byte[]

ComputeHash(SerialNumberChange)

Validate signatures using a public key.

Declaration
protected static byte[] ComputeHash(SerialNumberChange change)
Parameters
Type Name Description
SerialNumberChange change
Returns
Type Description
byte[]

ComputeHash(SignedPublicKey)

Validate signatures using a public key.

Declaration
protected static byte[] ComputeHash(SignedPublicKey key)
Parameters
Type Name Description
SignedPublicKey key
Returns
Type Description
byte[]

ComputeHash(SignedPublicKey, ILogger)

Validate signatures using a public key.

Declaration
protected static byte[] ComputeHash(SignedPublicKey key, ILogger logger)
Parameters
Type Name Description
SignedPublicKey key
ILogger logger
Returns
Type Description
byte[]

ComputeHash(string, string, ModuleLicense)

Validate signatures using a public key.

Declaration
public static byte[] ComputeHash(string serialNr, string companyName, ModuleLicense info)
Parameters
Type Name Description
string serialNr
string companyName
ModuleLicense info
Returns
Type Description
byte[]

ComputeHashOld(SignedPublicKey)

Validate signatures using a public key.

Declaration
protected static byte[] ComputeHashOld(SignedPublicKey key)
Parameters
Type Name Description
SignedPublicKey key
Returns
Type Description
byte[]

Validate(LicenseInfo)

Verify that a signature for a block of licenses is correct

Declaration
public bool Validate(LicenseInfo info)
Parameters
Type Name Description
LicenseInfo info

Module license record with name + number of licenses filled in.

Returns
Type Description
bool

True if the module's signature is valid.

Validate(SerialNumberChange)

Verify that the signature for a SerialNumberChange is correct.

Declaration
public bool Validate(SerialNumberChange change)
Parameters
Type Name Description
SerialNumberChange change

Describes the from/to serial + name change. Also contains a signature

Returns
Type Description
bool

True if the signature on the SerialNumberChange matches the public key.

Validate(SignedPublicKey)

Verify that a signature for a public key is correct.

Declaration
public static bool Validate(SignedPublicKey key)
Parameters
Type Name Description
SignedPublicKey key

Public key signed by SuperOffice

Returns
Type Description
bool

False if the key has not been signed by SuperOffice

Validate(SignedPublicKey, ILogger)

Verify that a signature for a public key is correct.

Declaration
public static bool Validate(SignedPublicKey key, ILogger logger)
Parameters
Type Name Description
SignedPublicKey key

Public key signed by SuperOffice

ILogger logger
Returns
Type Description
bool

False if the key has not been signed by SuperOffice

Validate(string, string, ModuleLicense)

Verify that the signature on a module license is correct.

Declaration
public bool Validate(string serialNr, string companyName, ModuleLicense info)
Parameters
Type Name Description
string serialNr

Customer Serial Nr

string companyName

Customer company name

ModuleLicense info

Module license record with name + number of licenses filled in.

Returns
Type Description
bool

True if the module's signature is valid.

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top