Merge pull request #817 from meitar/revkey-readme-fix

Fix revocation example in README, use `revocationCertificate`.
This commit is contained in:
Sanjana Rajan 2018-12-17 14:40:59 +01:00 committed by GitHub
commit a173e568af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,17 +379,17 @@ var options = {
openpgp.generateKey(options).then(function(key) { openpgp.generateKey(options).then(function(key) {
var privkey = key.privateKeyArmored; // '-----BEGIN PGP PRIVATE KEY BLOCK ... ' var privkey = key.privateKeyArmored; // '-----BEGIN PGP PRIVATE KEY BLOCK ... '
var pubkey = key.publicKeyArmored; // '-----BEGIN PGP PUBLIC KEY BLOCK ... ' var pubkey = key.publicKeyArmored; // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
var revocationSignature = key.revocationSignature; // '-----BEGIN PGP PUBLIC KEY BLOCK ... ' var revocationCertificate = key.revocationCertificate; // '-----BEGIN PGP PUBLIC KEY BLOCK ... '
}); });
``` ```
#### Revoke a key #### Revoke a key
Using a revocation signature: Using a revocation certificate:
```js ```js
var options = { var options = {
key: openpgp.key.readArmored(pubkey).keys[0], key: openpgp.key.readArmored(pubkey).keys[0],
revocationSignature: revocationSignature revocationCertificate: revocationCertificate
}; };
``` ```