summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/tip.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/tip.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts15
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index a90e5270f..07ce00d2e 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -30,6 +30,7 @@ import {
codecForTipResponse,
Logger,
URL,
+ DenomKeyType,
} from "@gnu-taler/taler-util";
import { DerivedTipPlanchet } from "../crypto/cryptoTypes.js";
import {
@@ -322,16 +323,20 @@ async function processTipImpl(
const planchet = planchets[i];
checkLogicInvariant(!!planchet);
- const denomSig = await ws.cryptoApi.rsaUnblind(
+ if (denom.denomPub.cipher !== 1) {
+ throw Error("unsupported cipher");
+ }
+
+ const denomSigRsa = await ws.cryptoApi.rsaUnblind(
blindedSig,
planchet.blindingKey,
- denom.denomPub,
+ denom.denomPub.rsa_public_key,
);
const isValid = await ws.cryptoApi.rsaVerify(
planchet.coinPub,
- denomSig,
- denom.denomPub,
+ denomSigRsa,
+ denom.denomPub.rsa_public_key,
);
if (!isValid) {
@@ -364,7 +369,7 @@ async function processTipImpl(
currentAmount: denom.value,
denomPub: denom.denomPub,
denomPubHash: denom.denomPubHash,
- denomSig: denomSig,
+ denomSig: { cipher: DenomKeyType.Rsa, rsa_signature: denomSigRsa },
exchangeBaseUrl: tipRecord.exchangeBaseUrl,
status: CoinStatus.Fresh,
suspended: false,