Methods
(async) isRevoked(primaryKey, certificate, key,, date, config) → {Promise.<Boolean>}
Checks if a given certificate of the user is revoked
Parameters:
Name | Type | Description |
---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
certificate |
SignaturePacket | The certificate to verify |
key, |
PublicSubkeyPacket | SecretSubkeyPacket | PublicKeyPacket | SecretKeyPacket | optional The key to verify the signature |
date |
Date | Use the given date instead of the current time |
config |
Object | Full configuration |
- Source:
Returns:
True if the certificate is revoked.
- Type
- Promise.<Boolean>
(async) sign(primaryKey, privateKeys, config) → {Promise.<Key>}
Signs user
Parameters:
Name | Type | Description |
---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
privateKeys |
Array.<Key> | Decrypted private keys for signing |
config |
Object | Full configuration |
- Source:
Returns:
New user with new certificate signatures.
- Type
- Promise.<Key>
toPacketlist() → {PacketList}
Transforms structured user data to packetlist
- Source:
Returns:
- Type
- PacketList
(async) update(user, primaryKey, config) → {Promise.<undefined>}
Update user with new components from specified user
Parameters:
Name | Type | Description |
---|---|---|
user |
User | Source user to merge |
primaryKey |
SecretKeyPacket | SecretSubkeyPacket | primary key used for validation |
config |
Object | Full configuration |
- Source:
Returns:
- Type
- Promise.<undefined>
(async) verify(primaryKey, date, config) → {Promise.<true>}
Verify User. Checks for existence of self signatures, revocation signatures and validity of self signature.
Parameters:
Name | Type | Description |
---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
date |
Date | Use the given date instead of the current time |
config |
Object | Full configuration |
- Source:
Throws:
-
if there are no valid self signatures.
- Type
- Error
Returns:
Status of user.
- Type
- Promise.<true>
(async) verifyAllCertifications(primaryKey, keys, date, config) → {Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: Boolean}>>}
Verifies all user certificates
Parameters:
Name | Type | Description |
---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
keys |
Array.<Key> | Array of keys to verify certificate signatures |
date |
Date | Use the given date instead of the current time |
config |
Object | Full configuration |
- Source:
Returns:
List of signer's keyID and validity of signature
- Type
- Promise.<Array.<{keyID: module:type/keyid~KeyID, valid: Boolean}>>
(async) verifyCertificate(primaryKey, certificate, keys, date, config) → {Promise.<(true|null)>}
Verifies the user certificate. Throws if the user certificate is invalid.
Parameters:
Name | Type | Description |
---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
certificate |
SignaturePacket | A certificate of this user |
keys |
Array.<Key> | Array of keys to verify certificate signatures |
date |
Date | Use the given date instead of the current time |
config |
Object | Full configuration |
- Source:
Returns:
Status of the certificate.
- Type
- Promise.<(true|null)>