Release 0.9.2

This commit is contained in:
Yarmo Mackenbach 2021-01-09 16:07:01 +01:00
parent 4f3db39b18
commit 8d2b935565
7 changed files with 54 additions and 18 deletions

View file

@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.9.2] - 2021-01-09
## Fixed
- Network errors blocking code execution
## [0.9.1] - 2021-01-09
## Changed
- Use signature data to find key location

53
dist/doip.js vendored
View file

@ -1193,7 +1193,7 @@ process.umask = function() { return 0; };
},{}],9:[function(require,module,exports){
module.exports={
"name": "doipjs",
"version": "0.9.1",
"version": "0.9.2",
"description": "Decentralized OpenPGP Identity Proofs library in Node.js",
"main": "src/index.js",
"dependencies": {
@ -1630,14 +1630,25 @@ const fetchHKP = (identifier, keyserverBaseUrl) => {
const lookupOpts = {
query: identifier,
}
let publicKey = await hkp.lookup(lookupOpts)
publicKey = (await openpgp.key.readArmored(publicKey)).keys[0]
if (publicKey == undefined) {
let publicKey = await hkp.lookup(lookupOpts)
.catch((error) => {
reject('Key does not exist or could not be fetched')
})
publicKey = await openpgp.key.readArmored(publicKey)
.then((result) => {
return result.keys[0]
})
.catch((error) => {
return null
})
if (publicKey) {
resolve(publicKey)
} else {
reject('Key does not exist or could not be fetched')
}
resolve(publicKey)
})
}
@ -1647,13 +1658,20 @@ const fetchWKD = (identifier) => {
const lookupOpts = {
email: identifier,
}
const publicKey = (await wkd.lookup(lookupOpts)).keys[0]
if (publicKey == undefined) {
const publicKey = await wkd.lookup(lookupOpts)
.then((result) => {
return result.keys[0]
})
.catch((error) => {
return null
})
if (publicKey) {
resolve(publicKey)
} else {
reject('Key does not exist or could not be fetched')
}
resolve(publicKey)
})
}
@ -1671,13 +1689,20 @@ const fetchKeybase = (username, fingerprint) => {
} catch (e) {
reject(`Error fetching Keybase key: ${e.message}`)
}
const publicKey = (await openpgp.key.readArmored(rawKeyContent)).keys[0]
if (publicKey == undefined) {
const publicKey = await openpgp.key.readArmored(rawKeyContent)
.then((result) => {
return result.keys[0]
})
.catch((error) => {
return null
})
if (publicKey) {
resolve(publicKey)
} else {
reject('Key does not exist or could not be fetched')
}
resolve(publicKey)
})
}

2
dist/doip.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
# doip.js <small>0.9.1</small>
# doip.js <small>0.9.2</small>
<img src="doip.png" width="120">

View file

@ -1,5 +1,12 @@
# Changelog
## [0.9.2]
[2021-01-09](https://codeberg.org/keyoxide/doipjs/releases/tag/0.9.2)
## Fixed
- Network errors blocking code execution
## [0.9.1]
[2021-01-09](https://codeberg.org/keyoxide/doipjs/releases/tag/0.9.1)

View file

@ -15,7 +15,7 @@ npm install --save doipjs
Install on website by including the following HTML snippet:
```html
<script src="https://cdn.jsdelivr.net/npm/doipjs@0.9.1/dist/doip.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/doipjs@0.9.2/dist/doip.min.js"></script>
```
Next step: [quick start (Node.js)](quickstart-nodejs.md) and [quick start (browser)](quickstart-browser.md)

View file

@ -1,6 +1,6 @@
{
"name": "doipjs",
"version": "0.9.1",
"version": "0.9.2",
"description": "Decentralized OpenPGP Identity Proofs library in Node.js",
"main": "src/index.js",
"dependencies": {