Skip to content

Commit

Permalink
Fix salty and randy constructors transferable flag (#277)
Browse files Browse the repository at this point in the history
* fix salty and randy constructors

* audit fix
  • Loading branch information
rodolfomiranda committed Sep 13, 2024
1 parent 1bc8a01 commit 2836523
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/keri/core/keeping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export class SaltyKeeper implements Keeper {
) {
// # Salter is the entered passcode and used for enc/dec of salts for each AID
this.salter = salter;
const signer = this.salter.signer(undefined, (transferable = false));
const signer = this.salter.signer(code, transferable, undefined, tier);

this.aeid = signer.verfer.qb64;

Expand Down Expand Up @@ -490,7 +490,7 @@ export class RandyKeeper implements Keeper {
this.count = count;
this.ncount = ncount;

const signer = this.salter.signer(undefined, (transferable = false));
const signer = this.salter.signer(code, transferable);
this.aeid = signer.verfer.qb64;

this.encrypter = new Encrypter({}, b(this.aeid));
Expand Down
1 change: 0 additions & 1 deletion test/app/aiding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ describe('Aiding', () => {
assert.equal(lastCall.path, '/identifiers');
assert.equal(lastCall.method, 'POST');
assert.equal(lastCall.body.name, 'aid1');
console.log(lastCall.body);
assert.deepEqual(lastCall.body.icp, {
v: 'KERI10JSON0000fd_',
t: 'icp',
Expand Down
4 changes: 2 additions & 2 deletions test/app/clienting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe('SignifyClient', () => {
lastHeaders
.get(HEADER_SIG_INPUT)
?.endsWith(
';keyid="BPmhSfdhCPxr3EqjxzEtF8TVy0YX7ATo0Uc8oo2cnmY9";alg="ed25519"'
';keyid="DPmhSfdhCPxr3EqjxzEtF8TVy0YX7ATo0Uc8oo2cnmY9";alg="ed25519"'
),
true
);
Expand All @@ -407,7 +407,7 @@ describe('SignifyClient', () => {
.split(';keyid=')[0];
const data = `"@method": POST\n"@path": /test\n"signify-resource": ELUvZ8aJEHAQE-0nsevyYTP98rBbGJUrTj5an-pCmwrK\n"signify-timestamp": ${lastHeaders.get(
HEADER_SIG_TIME
)}\n"@signature-params: (@method @path signify-resource signify-timestamp);created=${created};keyid=BPmhSfdhCPxr3EqjxzEtF8TVy0YX7ATo0Uc8oo2cnmY9;alg=ed25519"`;
)}\n"@signature-params: (@method @path signify-resource signify-timestamp);created=${created};keyid=DPmhSfdhCPxr3EqjxzEtF8TVy0YX7ATo0Uc8oo2cnmY9;alg=ed25519"`;

if (data) {
const raw = new TextEncoder().encode(data);
Expand Down
2 changes: 1 addition & 1 deletion test/app/delegating.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ describe('delegate', () => {
icodes: ['A'],
ncodes: ['A'],
dcode: 'E',
transferable: false,
transferable: true,
},
};
assert.equal(
Expand Down

0 comments on commit 2836523

Please sign in to comment.