certmanager/lib

Enumerations

enum  {
  SigStat_VALID = 0x0001 , SigStat_GREEN = 0x0002 , SigStat_RED = 0x0004 , SigStat_KEY_REVOKED = 0x0010 ,
  SigStat_KEY_EXPIRED = 0x0020 , SigStat_SIG_EXPIRED = 0x0040 , SigStat_KEY_MISSING = 0x0080 , SigStat_CRL_MISSING = 0x0100 ,
  SigStat_CRL_TOO_OLD = 0x0200 , SigStat_BAD_POLICY = 0x0400 , SigStat_SYS_ERROR = 0x0800 , SigStat_NUMERICAL_CODE = 0x8000
}
 
enum  {
  SigStatus_UNKNOWN = 0x0000 , SigStatus_VALID = SigStat_VALID , SigStatus_GREEN = SigStat_GREEN , SigStatus_RED = SigStat_RED ,
  SigStatus_KEY_REVOKED = SigStat_KEY_REVOKED , SigStatus_KEY_EXPIRED = SigStat_KEY_EXPIRED , SigStatus_SIG_EXPIRED = SigStat_SIG_EXPIRED , SigStatus_KEY_MISSING = SigStat_KEY_MISSING ,
  SigStatus_CRL_MISSING = SigStat_CRL_MISSING , SigStatus_CRL_TOO_OLD = SigStat_CRL_TOO_OLD , SigStatus_BAD_POLICY = SigStat_BAD_POLICY , SigStatus_SYS_ERROR = SigStat_SYS_ERROR ,
  SigStatus_NUMERICAL_CODE = 0x8000
}
 

Functions

bool CryptPlug::checkMessageSignature (char **cleartext, const char *signaturetext, bool signatureIsBinary, int signatureLen, struct SignatureMetaData *sigmeta, char **attrOrder, const char *unknownAttrsHandling)
 
bool CryptPlugWrapper::checkMessageSignature (char **cleartext, const char *signaturetext, bool signatureIsBinary, int signatureLen, CryptPlug::SignatureMetaData *sigmeta)
 

Detailed Description

This section describes methods that are used for working with signatures.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Flags used to compose the SigStatusFlags value.

This status flags are used to compose the SigStatusFlags value returned in SignatureMetaDataExtendedInfo after trying to verify a signed message part's signature status.

The normal flags may not be used together with the special SigStat_NUMERICAL_CODE flag. When finding the special SigStat_NUMERICAL_CODE flag in a SigStatusFlags value you can obtain the respective error code number by substracting the SigStatusFlags value by SigStat_NUMERICAL_CODE: this is used to transport special status information NOT matching any of the normal predefined status codes.

Note
to PlugIn developers: Implementations of the CryptPlug API should try to express their signature states by bit-wise OR'ing the normal SigStatusFlags values. Using the SigStat_NUMERICAL_CODE flag should only be used as for exceptional situations where no other flag(s) could be used. By using the normal status flags your PlugIn's users will be told an understandable description of the status - when using (SigStat_NUMERICAL_CODE + internalCode) they will only be shown the respective code number and have to look into your PlugIn's manual to learn about it's meaning...

Definition at line 279 of file cryptplug.h.

◆ anonymous enum

anonymous enum

Flags used to compose the SigStatusFlags value.

This status flags are used to compose the SigStatusFlags value returned in SignatureMetaDataExtendedInfo after trying to verify a signed message part's signature status.

The normal flags may not be used together with the special SigStatus_NUMERICAL_CODE flag. When finding the special SigStatus_NUMERICAL_CODE flag in a SigStatusFlags value you can obtain the respective error code number by substracting the SigStatusFlags value by SigStatus_NUMERICAL_CODE: this is used to transport special status information NOT matching any of the normal predefined status codes.

Note
to PlugIn developers: Implementations of the CryptPlug API should try to express their signature states by bit-wise OR'ing the normal SigStatusFlags values. Using the SigStatus_NUMERICAL_CODE flag should only be used as for exceptional situations where no other flag(s) could be used. By using the normal status flags your PlugIn's users will be told an understandable description of the status - when using (SigStatus_NUMERICAL_CODE + internalCode) they will only be shown the respective code number and have to look into your PlugIn's manual to learn about it's meaning...

Definition at line 501 of file cryptplugwrapper.h.

Function Documentation

◆ checkMessageSignature() [1/2]

bool CryptPlugWrapper::checkMessageSignature ( char **  cleartext,
const char *  signaturetext,
bool  signatureIsBinary,
int  signatureLen,
CryptPlug::SignatureMetaData *  sigmeta 
)

Checks whether the signature of a message is valid.

cleartext must never be 0 but be a valid pointer.

If *cleartext > 0 then **cleartext specifies the message text that was signed and signaturetext is the signature itself.

If *cleartext == 0 is an empty string then signaturetext is supposed to contain an opaque signed message part. After checking the data and verifying the signature the cleartext of the message will be returned in cleartext. The user must free the respective memory occupied by *cleartext.

Depending on the configuration, MUAs might not need to use this. If sigmeta is non-null, the SignatureMetaData object pointed to will contain meta information about the signature after the function call.

Definition at line 566 of file cryptplugwrapper.cpp.

◆ checkMessageSignature() [2/2]

bool CryptPlug::checkMessageSignature ( char **  cleartext,
const char *  signaturetext,
bool  signatureIsBinary,
int  signatureLen,
struct SignatureMetaData *  sigmeta,
char **  attrOrder,
const char *  unknownAttrsHandling 
)

Checks whether the signature of a message is valid.

cleartext must never be 0 but be a valid pointer.

If *cleartext > 0 then **cleartext specifies the message text that was signed and signaturetext is the signature itself.

If *cleartext == 0 is an empty string then signaturetext is supposed to contain an opaque signed message part. After checking the data and verifying the signature the cleartext of the message will be returned in cleartext. The user must free the respective memory ocupied by *cleartext.

Depending on the configuration, MUAs might not need to use this. If sigmeta is non-null, the SignatureMetaData object pointed to will contain meta information about the signature after the function call.

Definition at line 961 of file cryptplug.cpp.