- Inherits From:
- NSObject
- Conforms To:
- NSCopying
- Declared In:
- GPGME/GPGSignature.h
Synopsis:
typedef enum {
GPGSignatureSummaryValidMask = 0x0001,
GPGSignatureSummaryGreenMask = 0x0002,
GPGSignatureSummaryRedMask = 0x0004,
GPGSignatureSummaryKeyRevokedMask = 0x0010,
GPGSignatureSummaryKeyExpiredMask = 0x0020,
GPGSignatureSummarySignatureExpiredMask = 0x0040,
GPGSignatureSummaryKeyMissingMask = 0x0080,
GPGSignatureSummaryCRLMissingMask = 0x0100,
GPGSignatureSummaryCRLTooOldMask = 0x0200,
GPGSignatureSummaryBadPolicyMask = 0x0400,
GPGSignatureSummarySystemErrorMask = 0x0800
}GPGSignatureSummaryMask;
Description:
Mask values used in -summary.
GPGSignatureSummaryValidMask The signature is fully valid. GPGSignatureSummaryGreenMask The signature is good but one might want to display some extra information. Check the other bits. GPGSignatureSummaryRedMask The signature is bad. It might be useful to check other bits and display more information, i.e. a revoked certificate might not render a signature invalid when the message was received prior to the cause for the revocation. GPGSignatureSummaryKeyRevokedMask The key or at least one certificate has been revoked. GPGSignatureSummaryKeyExpiredMask The key or one of the certificates has expired. It is probably a good idea to display the date of the expiration. GPGSignatureSummarySignatureExpiredMask The signature has expired GPGSignatureSummaryKeyMissingMask Can't verify due to a missing key or certificate. GPGSignatureSummaryCRLMissingMask The CRL (or an equivalent mechanism) is not available. GPGSignatureSummaryCRLTooOldMask Available CRL is too old. GPGSignatureSummaryBadPolicyMask A policy requirement was not met. GPGSignatureSummarySystemErrorMask A system error occured.
Synopsis:
GPGSIGNATURE_H
NSString *_fingerprint;
NSCalendarDate *_creationDate;
NSCalendarDate *_expirationDate;
GPGValidity _validity;
GPGError _status;
GPGSignatureSummaryMask _summary;
NSDictionary *_notations;
NSArray *_policyURLs;
GPGError _validityError;
BOOL _wrongKeyUsage;
GPGPublicKeyAlgorithm _algorithm;
GPGHashAlgorithm _hashAlgorithm;
unsigned int _signatureClass;
_fingerprint No description. _creationDate No description. _expirationDate No description. _validity No description. _status No description. _summary No description. _notations No description. _policyURLs No description. _validityError No description. _wrongKeyUsage No description. _algorithm No description. _hashAlgorithm No description. _signatureClass No description.
AttributesNotations
- - fingerprint
- - creationDate
- - expirationDate
- - validity
- - status
- - summary
- - algorithm
- - hashAlgorithm
- - signatureClass
Misc
- - notations
- - policyURLs
Convenience methods
- - validityError
- - wrongKeyUsage
- - validityDescription
- - algorithmDescription
- - hashAlgorithmDescription
- - formattedFingerprint
- (GPGPublicKeyAlgorithm)algorithm
Returns the algorithm used to create the signature. Not (yet?) available for signatures returned after a verification operation.
- (NSString *)algorithmDescription
Returns the localized description of the algorithm used to create the signature. Not (yet?) available for signatures returned after a verification operation.
- (NSCalendarDate *)creationDate
Returns signature creation date. Returns nil when not available or invalid.
- (NSCalendarDate *)expirationDate
Returns signature expiration date. Returns nil if signature does not expire. Not used for new signatures.
- (NSString *)fingerprint
Returns signer's key fingerprint (or keyID!).
- (NSString *)formattedFingerprint
If -fingerprint returns a fingerprint, returns fingerprint in hex digit form, formatted like this:
XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX
or
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
If -fingerprint returns a keyID, return keyID prefixed by 0x.
- (GPGHashAlgorithm)hashAlgorithm
Returns the hash algorithm used for the newly-created signature.
- (NSString *)hashAlgorithmDescription
Returns the localized description of the algorithm used for the newly-created signature.
- (NSDictionary *)notations
Returns a dictionary of notation data key-value pairs. A notation is a key/value pair that is added to the content, it can be anything. Value is returned as an NSString instance. Not used for new signatures.
- (NSArray *)policyURLs
Returns an array of policy URLs as NSString instances. A policy URL is an URL to a document that documents the persons policy in signing other peoples keys. Not used for new signatures.
- (unsigned int)signatureClass
Returns the signature class of a key signature or a new signature. The meaning is specific to the crypto engine.
This attribute is not (yet?) available for signatures returned after a verification operation.
- (GPGError)status
Returns signature status. In particular, the following status codes are of interest:
GPGErrorNoError | This status indicates that the signature is valid. For the combined result this status means that all signatures are valid. |
GPGErrorSignatureExpired | This status indicates that the signature is valid but expired. For the combined result this status means that all signatures are valid and expired. |
GPGErrorKeyExpired | This status indicates that the signature is valid but the key used to verify the signature has expired. For the combined result this status means that all signatures are valid and all keys are expired. |
GPGErrorCertificateRevoked | This status indicates that the signature is valid but the key used to verify the signature has been revoked. For the combined result this status means that all signatures are valid and all keys are revoked. |
GPGErrorBadSignature | This status indicates that the signature is invalid. For the combined result this status means that all signatures are invalid. |
GPGErrorNoPublicKey | This status indicates that the signature could not be verified due to a missing key. For the combined result this status means that all signatures could not be checked due to missing keys. |
GPGErrorGeneralError | This status indicates that there was some other error which prevented the signature verification. |
- (GPGSignatureSummaryMask)summary
Returns a mask giving a summary of the signature status. Not used for new signatures.
- (GPGValidity)validity
Returns signature's validity. Not used for new signatures.
Note that a signature's validity is never GPGValidityUltimate, because GPGValidityUltimate is reserved for key certification, not for signatures.
- (NSString *)validityDescription
Returns signature's validity in localized human readable form. Not used for new signatures.
- (GPGError)validityError
If a signature is not valid, this provides a reason why. Not used for new signatures.
- (BOOL)wrongKeyUsage
Returns YES if the key was not used according to its policy. Not used for new signatures.