From 5c5bc061b279a24597dcfec3005421131f4ad1fb Mon Sep 17 00:00:00 2001 From: Berend Sliedrecht Date: Tue, 19 Dec 2023 18:20:07 +0100 Subject: [PATCH 1/5] fix(nodejs): reduce get_current_error calls Signed-off-by: Berend Sliedrecht --- .../src/NodeJSAriesAskar.ts | 258 +++++++++--------- .../src/library/bindings.ts | 13 +- .../aries-askar-nodejs/tests/error.test.ts | 50 ++++ .../src/ReactNativeAriesAskar.ts | 30 +- .../src/ariesAskar/AriesAskar.ts | 3 +- .../aries-askar-shared/src/error.ts | 9 +- 6 files changed, 208 insertions(+), 155 deletions(-) create mode 100644 wrappers/javascript/aries-askar-nodejs/tests/error.test.ts diff --git a/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts b/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts index 0733cda4..961e6888 100644 --- a/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts +++ b/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts @@ -139,14 +139,13 @@ function handleReturnPointer(returnValue: Buffer): Return { } export class NodeJSAriesAskar implements AriesAskar { - private promisify = async (method: (nativeCallbackPtr: Buffer, id: number) => void): Promise => { + private promisify = async (method: (nativeCallbackPtr: Buffer, id: number) => number): Promise => { return new Promise((resolve, reject) => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const cb: NativeCallback = (id, _) => { + const cb: NativeCallback = (id, errorCode) => { deallocateCallbackBuffer(id) try { - this.handleError() + this.handleError(errorCode) } catch (e) { reject(e) } @@ -159,17 +158,16 @@ export class NodeJSAriesAskar implements AriesAskar { } private promisifyWithResponse = async ( - method: (nativeCallbackWithResponsePtr: Buffer, id: number) => void, + method: (nativeCallbackWithResponsePtr: Buffer, id: number) => number, responseFfiType = FFI_STRING ): Promise => { return new Promise((resolve, reject) => { const cb: NativeCallbackWithResponse = (id, errorCode, response) => { deallocateCallbackBuffer(id) - if (errorCode) { - const nativeError = allocateStringBuffer() - this.nativeAriesAskar.askar_get_current_error(nativeError) - return reject(new AriesAskarError(JSON.parse(nativeError.deref() as string) as AriesAskarErrorObject)) + if (errorCode !== 0) { + const error = this.getCurrentError() + reject(new AriesAskarError(error)) } if (typeof response === 'string') { @@ -182,27 +180,29 @@ export class NodeJSAriesAskar implements AriesAskar { } else if (typeof response === 'number') { resolve(response as unknown as Return) } else if (response instanceof Buffer) { - if (response.address() === 0) return resolve(null) - + if (response.address() === 0) resolve(null) resolve(response as unknown as Return) } - reject(`could not parse return type properly (type: ${typeof response})`) + reject( + AriesAskarError.customError({ message: `could not parse return type properly (type: ${typeof response})` }) + ) } const { nativeCallback, id } = toNativeCallbackWithResponse(cb, responseFfiType) - method(nativeCallback, +id) + const errorCode = method(nativeCallback, +id) + if (errorCode !== 0) deallocateCallbackBuffer(+id) + + this.handleError(errorCode) }) } - private handleError() { - const nativeError = allocateStringBuffer() - this.nativeAriesAskar.askar_get_current_error(nativeError) - - const ariesAskarErrorObject = JSON.parse(nativeError.deref() as string) as AriesAskarErrorObject + private handleError(errorCode: number) { + if (errorCode === 0) return - if (ariesAskarErrorObject.code === 0) return + const error = this.getCurrentError() + if (error.code === 0) return - throw new AriesAskarError(ariesAskarErrorObject) + throw new AriesAskarError(error) } public get nativeAriesAskar() { return getNativeAriesAskar() @@ -212,16 +212,16 @@ export class NodeJSAriesAskar implements AriesAskar { return this.nativeAriesAskar.askar_version() } - public getCurrentError(): string { + public getCurrentError(): AriesAskarErrorObject { const error = allocateStringBuffer() this.nativeAriesAskar.askar_get_current_error(error) - this.handleError() - return handleReturnPointer(error) + const serializedError = handleReturnPointer(error) + + return JSON.parse(serializedError) as AriesAskarErrorObject } public clearCustomLogger(): void { this.nativeAriesAskar.askar_clear_custom_logger() - this.handleError() } // TODO: the id has to be deallocated when its done, but how? @@ -229,29 +229,29 @@ export class NodeJSAriesAskar implements AriesAskar { const { id, nativeCallback } = toNativeLogCallback(logger) // TODO: flush and enabled are just guessed - this.nativeAriesAskar.askar_set_custom_logger(0, nativeCallback, +enabled, +flush, logLevel) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_set_custom_logger(0, nativeCallback, +enabled, +flush, logLevel) + this.handleError(errorCode) deallocateCallbackBuffer(+id) } public setDefaultLogger(): void { - this.nativeAriesAskar.askar_set_default_logger() - this.handleError() + const errorCode = this.nativeAriesAskar.askar_set_default_logger() + this.handleError(errorCode) } public setMaxLogLevel(options: SetMaxLogLevelOptions): void { const { logLevel } = serializeArguments(options) - this.nativeAriesAskar.askar_set_max_log_level(logLevel) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_set_max_log_level(logLevel) + this.handleError(errorCode) } public entryListCount(options: EntryListCountOptions): number { const { entryListHandle } = serializeArguments(options) const ret = allocateInt32Buffer() - this.nativeAriesAskar.askar_entry_list_count(entryListHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_entry_list_count(entryListHandle, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -260,15 +260,14 @@ export class NodeJSAriesAskar implements AriesAskar { const { entryListHandle } = serializeArguments(options) this.nativeAriesAskar.askar_entry_list_free(entryListHandle) - this.handleError() } public entryListGetCategory(options: EntryListGetCategoryOptions): string { const { entryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_entry_list_get_category(entryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_entry_list_get_category(entryListHandle, index, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -277,8 +276,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { entryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_entry_list_get_name(entryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_entry_list_get_name(entryListHandle, index, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -287,8 +286,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { entryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_entry_list_get_tags(entryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_entry_list_get_tags(entryListHandle, index, ret) + this.handleError(errorCode) return handleNullableReturnPointer(ret) } @@ -298,8 +297,8 @@ export class NodeJSAriesAskar implements AriesAskar { const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_entry_list_get_value(entryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_entry_list_get_value(entryListHandle, index, ret) + this.handleError(errorCode) const byteBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(byteBuffer)) @@ -309,8 +308,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { aad, ciphertext, localKeyHandle, nonce, tag } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_aead_decrypt(localKeyHandle, ciphertext, nonce, tag, aad, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_aead_decrypt(localKeyHandle, ciphertext, nonce, tag, aad, ret) + this.handleError(errorCode) const byteBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(byteBuffer)) @@ -320,8 +319,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, aad, nonce, message } = serializeArguments(options) const ret = allocateEncryptedBuffer() - this.nativeAriesAskar.askar_key_aead_encrypt(localKeyHandle, message, nonce, aad, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_aead_encrypt(localKeyHandle, message, nonce, aad, ret) + this.handleError(errorCode) const encryptedBuffer = handleReturnPointer(ret) return encryptedBufferStructToClass(encryptedBuffer) @@ -331,8 +330,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, msgLen } = serializeArguments(options) const ret = allocateInt32Buffer() - this.nativeAriesAskar.askar_key_aead_get_padding(localKeyHandle, msgLen, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_aead_get_padding(localKeyHandle, msgLen, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -341,8 +340,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateAeadParams() - this.nativeAriesAskar.askar_key_aead_get_params(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_aead_get_params(localKeyHandle, ret) + this.handleError(errorCode) return new AeadParams(handleReturnPointer(ret)) } @@ -351,8 +350,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_aead_random_nonce(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_aead_random_nonce(localKeyHandle, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -362,8 +361,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, algorithm } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_convert(localKeyHandle, algorithm, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_convert(localKeyHandle, algorithm, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -373,8 +372,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { nonce, message, recipientKey, senderKey } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_crypto_box(recipientKey, senderKey, message, nonce, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_crypto_box(recipientKey, senderKey, message, nonce, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -384,8 +383,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { nonce, message, senderKey, recipientKey } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_crypto_box_open(recipientKey, senderKey, message, nonce, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_crypto_box_open(recipientKey, senderKey, message, nonce, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -394,8 +393,8 @@ export class NodeJSAriesAskar implements AriesAskar { public keyCryptoBoxRandomNonce(): Uint8Array { const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_crypto_box_random_nonce(ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_crypto_box_random_nonce(ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -405,8 +404,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { message, localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_crypto_box_seal(localKeyHandle, message, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_crypto_box_seal(localKeyHandle, message, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -416,8 +415,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { ciphertext, localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_crypto_box_seal_open(localKeyHandle, ciphertext, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_crypto_box_seal_open(localKeyHandle, ciphertext, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -429,7 +428,7 @@ export class NodeJSAriesAskar implements AriesAskar { const ret = allocatePointer() - this.nativeAriesAskar.askar_key_derive_ecdh_1pu( + const errorCode = this.nativeAriesAskar.askar_key_derive_ecdh_1pu( algorithm, ephemeralKey, senderKey, @@ -441,7 +440,7 @@ export class NodeJSAriesAskar implements AriesAskar { receive, ret ) - this.handleError() + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -451,8 +450,17 @@ export class NodeJSAriesAskar implements AriesAskar { const { receive, apv, apu, algId, recipientKey, ephemeralKey, algorithm } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_derive_ecdh_es(algorithm, ephemeralKey, recipientKey, algId, apu, apv, receive, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_derive_ecdh_es( + algorithm, + ephemeralKey, + recipientKey, + algId, + apu, + apv, + receive, + ret + ) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -462,8 +470,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { keyEntryListHandle } = serializeArguments(options) const ret = allocateInt32Buffer() - this.nativeAriesAskar.askar_key_entry_list_count(keyEntryListHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_entry_list_count(keyEntryListHandle, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -472,15 +480,14 @@ export class NodeJSAriesAskar implements AriesAskar { const { keyEntryListHandle } = serializeArguments(options) this.nativeAriesAskar.askar_key_entry_list_free(keyEntryListHandle) - this.handleError() } public keyEntryListGetAlgorithm(options: KeyEntryListGetAlgorithmOptions): string { const { keyEntryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_entry_list_get_algorithm(keyEntryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_entry_list_get_algorithm(keyEntryListHandle, index, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -489,8 +496,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { keyEntryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_entry_list_get_metadata(keyEntryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_entry_list_get_metadata(keyEntryListHandle, index, ret) + this.handleError(errorCode) return handleNullableReturnPointer(ret) } @@ -499,8 +506,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { keyEntryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_entry_list_get_name(keyEntryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_entry_list_get_name(keyEntryListHandle, index, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -509,7 +516,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { keyEntryListHandle, index } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_entry_list_get_tags(keyEntryListHandle, index, ret) + const errorCode = this.nativeAriesAskar.askar_key_entry_list_get_tags(keyEntryListHandle, index, ret) + this.handleError(errorCode) return handleNullableReturnPointer(ret) } @@ -518,8 +526,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { index, keyEntryListHandle } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_entry_list_load_local(keyEntryListHandle, index, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_entry_list_load_local(keyEntryListHandle, index, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -529,15 +537,14 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) this.nativeAriesAskar.askar_key_free(localKeyHandle) - this.handleError() } public keyFromJwk(options: KeyFromJwkOptions): LocalKeyHandle { const { jwk } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_from_jwk(jwk, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_from_jwk(jwk, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -547,8 +554,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { algorithm, pkHandle, skHandle } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_from_key_exchange(algorithm, skHandle, pkHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_from_key_exchange(algorithm, skHandle, pkHandle, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -558,8 +565,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { publicKey, algorithm } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_from_public_bytes(algorithm, publicKey, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_from_public_bytes(algorithm, publicKey, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -569,8 +576,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { secretKey, algorithm } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_from_secret_bytes(algorithm, secretKey, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_from_secret_bytes(algorithm, secretKey, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -580,8 +587,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { algorithm, method, seed } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_from_seed(algorithm, seed, method, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_from_seed(algorithm, seed, method, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -591,8 +598,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { algorithm, ephemeral } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_generate(algorithm, ephemeral, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_generate(algorithm, ephemeral, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -602,8 +609,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_get_algorithm(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_algorithm(localKeyHandle, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -612,8 +619,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateInt32Buffer() - this.nativeAriesAskar.askar_key_get_ephemeral(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_ephemeral(localKeyHandle, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -622,8 +629,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, algorithm } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_get_jwk_public(localKeyHandle, algorithm, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_jwk_public(localKeyHandle, algorithm, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -632,8 +639,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_get_jwk_secret(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_jwk_secret(localKeyHandle, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -643,8 +650,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, algorithm } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_key_get_jwk_thumbprint(localKeyHandle, algorithm, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_jwk_thumbprint(localKeyHandle, algorithm, ret) + this.handleError(errorCode) return handleReturnPointer(ret) } @@ -653,8 +660,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_get_public_bytes(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_public_bytes(localKeyHandle, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -664,8 +671,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_get_secret_bytes(localKeyHandle, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_get_secret_bytes(localKeyHandle, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -675,8 +682,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, message, sigType } = serializeArguments(options) const ret = allocateSecretBuffer() - this.nativeAriesAskar.askar_key_sign_message(localKeyHandle, message, sigType, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_sign_message(localKeyHandle, message, sigType, ret) + this.handleError(errorCode) const secretBuffer = handleReturnPointer(ret) return new Uint8Array(secretBufferToBuffer(secretBuffer)) @@ -686,8 +693,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, algorithm, ciphertext, nonce, tag } = serializeArguments(options) const ret = allocatePointer() - this.nativeAriesAskar.askar_key_unwrap_key(localKeyHandle, algorithm, ciphertext, nonce, tag, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_unwrap_key(localKeyHandle, algorithm, ciphertext, nonce, tag, ret) + this.handleError(errorCode) const handle = handleReturnPointer(ret) return new LocalKeyHandle(handle) @@ -697,8 +704,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, sigType, message, signature } = serializeArguments(options) const ret = allocateInt8Buffer() - this.nativeAriesAskar.askar_key_verify_signature(localKeyHandle, message, signature, sigType, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_verify_signature(localKeyHandle, message, signature, sigType, ret) + this.handleError(errorCode) return Boolean(handleReturnPointer(ret)) } @@ -707,8 +714,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { localKeyHandle, nonce, other } = serializeArguments(options) const ret = allocateEncryptedBuffer() - this.nativeAriesAskar.askar_key_wrap_key(localKeyHandle, other, nonce, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_key_wrap_key(localKeyHandle, other, nonce, ret) + this.handleError(errorCode) const encryptedBuffer = handleReturnPointer(ret) return encryptedBufferStructToClass(encryptedBuffer) @@ -717,8 +724,8 @@ export class NodeJSAriesAskar implements AriesAskar { public scanFree(options: ScanFreeOptions): void { const { scanHandle } = serializeArguments(options) - this.nativeAriesAskar.askar_scan_free(scanHandle) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_scan_free(scanHandle) + this.handleError(errorCode) } public async scanNext(options: ScanNextOptions): Promise { @@ -868,9 +875,10 @@ export class NodeJSAriesAskar implements AriesAskar { public async sessionStart(options: SessionStartOptions): Promise { const { storeHandle, profile, asTransaction } = serializeArguments(options) - const handle = await this.promisifyWithResponse((cb, cbId) => { - this.nativeAriesAskar.askar_session_start(storeHandle, profile, asTransaction, cb, cbId) - }, FFI_SESSION_HANDLE) + const handle = await this.promisifyWithResponse( + (cb, cbId) => this.nativeAriesAskar.askar_session_start(storeHandle, profile, asTransaction, cb, cbId), + FFI_SESSION_HANDLE + ) return SessionHandle.fromHandle(handle) } @@ -929,8 +937,8 @@ export class NodeJSAriesAskar implements AriesAskar { const { seed } = serializeArguments(options) const ret = allocateStringBuffer() - this.nativeAriesAskar.askar_store_generate_raw_key(seed, ret) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_store_generate_raw_key(seed, ret) + this.handleError(errorCode) return ret.deref() as string } @@ -963,14 +971,14 @@ export class NodeJSAriesAskar implements AriesAskar { throw AriesAskarError.customError({ message: 'Invalid handle' }) } const counti32 = allocateInt32Buffer() - this.nativeAriesAskar.askar_string_list_count(listHandle, counti32) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_string_list_count(listHandle, counti32) + this.handleError(errorCode) const count = counti32.deref() as number const ret = [] const strval = allocateStringBuffer() for (let i = 0; i < count; i++) { - this.nativeAriesAskar.askar_string_list_get_item(listHandle, i, strval) - this.handleError() + const errorCode = this.nativeAriesAskar.askar_string_list_get_item(listHandle, i, strval) + this.handleError(errorCode) ret.push(strval.deref() as string) } this.nativeAriesAskar.askar_string_list_free(listHandle) diff --git a/wrappers/javascript/aries-askar-nodejs/src/library/bindings.ts b/wrappers/javascript/aries-askar-nodejs/src/library/bindings.ts index 29f86f78..1568f98e 100644 --- a/wrappers/javascript/aries-askar-nodejs/src/library/bindings.ts +++ b/wrappers/javascript/aries-askar-nodejs/src/library/bindings.ts @@ -24,27 +24,28 @@ import { ByteBufferStruct, AeadParamsStructPtr, EncryptedBufferStructPtr, + FFI_VOID, } from '../ffi' export const nativeBindings = { // first element is method return type, second element is list of method argument types askar_version: [FFI_STRING, []], askar_get_current_error: [FFI_ERROR_CODE, [FFI_STRING_PTR]], - askar_buffer_free: [FFI_ERROR_CODE, [SecretBufferStruct]], - askar_clear_custom_logger: [FFI_ERROR_CODE, []], + askar_buffer_free: [FFI_VOID, [SecretBufferStruct]], + askar_clear_custom_logger: [FFI_VOID, []], askar_set_custom_logger: [FFI_ERROR_CODE, [FFI_INT32, FFI_CALLBACK_PTR, FFI_INT32, FFI_INT32, FFI_INT32]], askar_set_default_logger: [FFI_ERROR_CODE, []], askar_set_max_log_level: [FFI_ERROR_CODE, [FFI_INT32]], askar_entry_list_count: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE, FFI_INT32_PTR]], - askar_entry_list_free: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE]], + askar_entry_list_free: [FFI_VOID, [FFI_ENTRY_LIST_HANDLE]], askar_entry_list_get_category: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_entry_list_get_name: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_entry_list_get_tags: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_entry_list_get_value: [FFI_ERROR_CODE, [FFI_ENTRY_LIST_HANDLE, FFI_INT32, SecretBufferStructPtr]], askar_string_list_count: [FFI_ERROR_CODE, [FFI_STRING_LIST_HANDLE, FFI_INT32_PTR]], - askar_string_list_free: [FFI_ERROR_CODE, [FFI_STRING_LIST_HANDLE]], + askar_string_list_free: [FFI_VOID, [FFI_STRING_LIST_HANDLE]], askar_string_list_get_item: [FFI_ERROR_CODE, [FFI_STRING_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_key_aead_decrypt: [ @@ -99,13 +100,13 @@ export const nativeBindings = { ], ], askar_key_entry_list_count: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32_PTR]], - askar_key_entry_list_free: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE]], + askar_key_entry_list_free: [FFI_VOID, [FFI_KEY_ENTRY_LIST_HANDLE]], askar_key_entry_list_get_algorithm: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_key_entry_list_get_metadata: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_key_entry_list_get_name: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_key_entry_list_get_tags: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32, FFI_STRING_PTR]], askar_key_entry_list_load_local: [FFI_ERROR_CODE, [FFI_KEY_ENTRY_LIST_HANDLE, FFI_INT32, refType(FFI_POINTER)]], - askar_key_free: [FFI_ERROR_CODE, [FFI_POINTER]], + askar_key_free: [FFI_VOID, [FFI_POINTER]], askar_key_from_jwk: [FFI_ERROR_CODE, [ByteBufferStruct, refType(FFI_POINTER)]], askar_key_from_key_exchange: [FFI_ERROR_CODE, [FFI_STRING, FFI_POINTER, FFI_POINTER, FFI_LOCAL_KEY_HANDLE]], askar_key_from_public_bytes: [FFI_ERROR_CODE, [FFI_STRING, ByteBufferStruct, FFI_LOCAL_KEY_HANDLE]], diff --git a/wrappers/javascript/aries-askar-nodejs/tests/error.test.ts b/wrappers/javascript/aries-askar-nodejs/tests/error.test.ts new file mode 100644 index 00000000..03b0e8df --- /dev/null +++ b/wrappers/javascript/aries-askar-nodejs/tests/error.test.ts @@ -0,0 +1,50 @@ +import { ariesAskar, AriesAskarError } from '@hyperledger/aries-askar-shared' + +import { KeyAlgs } from '../../aries-askar-shared' + +import { setupWallet } from './utils' + +describe('Error', () => { + beforeAll(() => { + require('@hyperledger/aries-askar-nodejs') + }) + + test('set error code to 0 after correct call', () => { + expect(() => ariesAskar.keyGenerate({ algorithm: KeyAlgs.AesA128CbcHs256, ephemeral: true })).not.toThrowError() + }) + + test('set error code to non 0 after incorrect call', () => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + expect(() => ariesAskar.keyGenerate({ algorithm: 'incorrect-alg', ephemeral: true })).toThrowError( + new AriesAskarError({ code: 1, message: 'Unknown key algorithm' }) + ) + }) + + test('set error code to 0 correct async call', async () => { + const store = await setupWallet() + + await expect(store.openSession()).resolves.toBeTruthy() + }) + + test('set error code to non 0 incorrect async call where the error is outside the callback', async () => { + const store = await setupWallet() + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-expect-error + await expect(store.removeProfile()).rejects.toMatchObject({ + code: 5, + message: 'Profile name not provided', + }) + }) + + test('set error code to non 0 incorrect async call where the error is inside the callback', async () => { + const store = await setupWallet() + await store.close() + + await expect(store.close()).rejects.toMatchObject({ + code: 5, + message: 'Invalid store handle', + }) + }) +}) diff --git a/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts b/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts index 613f5d0c..ddc691db 100644 --- a/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts +++ b/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts @@ -62,8 +62,6 @@ import type { SessionStartOptions, SessionUpdateKeyOptions, SessionUpdateOptions, - SetCustomLoggerOptions, - SetMaxLogLevelOptions, StoreCloseOptions, StoreCopyToOptions, StoreCreateProfileOptions, @@ -102,21 +100,19 @@ export class ReactNativeAriesAskar implements AriesAskar { } private handleError({ errorCode, value }: ReturnObject): T { - if (errorCode !== 0) { - throw new AriesAskarError(JSON.parse(this.getCurrentError()) as AriesAskarErrorObject) - } - - return value as T + if (errorCode === 0) return value as T + throw new AriesAskarError(this.getCurrentError()) } private promisify = (method: (cb: Callback) => void): Promise => { return new Promise((resolve, reject) => { const _cb: Callback = ({ errorCode }) => { if (errorCode !== 0) { - reject(new AriesAskarError(JSON.parse(this.getCurrentError()) as AriesAskarErrorObject)) - } else { - resolve() + const error = this.getCurrentError() + reject(new AriesAskarError(error)) } + + resolve() } method(_cb) @@ -129,7 +125,8 @@ export class ReactNativeAriesAskar implements AriesAskar { return new Promise((resolve, reject) => { const _cb: CallbackWithResponse = ({ errorCode, value }) => { if (errorCode !== 0) { - reject(new AriesAskarError(JSON.parse(this.getCurrentError()) as AriesAskarErrorObject)) + const error = this.getCurrentError() + reject(new AriesAskarError(error)) } else { if (value === undefined) { reject( @@ -148,16 +145,16 @@ export class ReactNativeAriesAskar implements AriesAskar { return handleInvalidNullResponse(this.ariesAskar.version({})) } - public getCurrentError(): string { - return handleInvalidNullResponse(this.ariesAskar.getCurrentError({})) + public getCurrentError(): AriesAskarErrorObject { + const serializedError = handleInvalidNullResponse(this.ariesAskar.getCurrentError({})) + return JSON.parse(serializedError) as AriesAskarErrorObject } public clearCustomLogger(): void { throw new Error('Method not implemented. clearCustomLogger') } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - public setCustomLogger(_: SetCustomLoggerOptions): void { + public setCustomLogger(): void { throw new Error('Method not implemented. setCustomLogger') } @@ -165,8 +162,7 @@ export class ReactNativeAriesAskar implements AriesAskar { this.ariesAskar.setDefaultLogger({}) } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - public setMaxLogLevel(_: SetMaxLogLevelOptions): void { + public setMaxLogLevel(): void { throw new Error('Method not implemented. setMaxLogLevel') } diff --git a/wrappers/javascript/aries-askar-shared/src/ariesAskar/AriesAskar.ts b/wrappers/javascript/aries-askar-shared/src/ariesAskar/AriesAskar.ts index acaebc94..dba9ba6e 100644 --- a/wrappers/javascript/aries-askar-shared/src/ariesAskar/AriesAskar.ts +++ b/wrappers/javascript/aries-askar-shared/src/ariesAskar/AriesAskar.ts @@ -9,6 +9,7 @@ import type { StoreHandle, } from '../crypto' import type { KeyAlgs, LogLevel, SigAlgs } from '../enums' +import type { AriesAskarErrorObject } from '../error' import type { AeadParams, EncryptedBuffer } from '../types' export type ErrorCode = number @@ -235,7 +236,7 @@ export type MigrateIndySdkOptions = { specUri: string; walletName: string; walle export type AriesAskar = { version(): string - getCurrentError(): string + getCurrentError(): AriesAskarErrorObject clearCustomLogger(): void setCustomLogger(options: SetCustomLoggerOptions): void diff --git a/wrappers/javascript/aries-askar-shared/src/error.ts b/wrappers/javascript/aries-askar-shared/src/error.ts index efb042f1..c51a0bb9 100644 --- a/wrappers/javascript/aries-askar-shared/src/error.ts +++ b/wrappers/javascript/aries-askar-shared/src/error.ts @@ -1,17 +1,14 @@ export type AriesAskarErrorObject = { code: number - extra?: string - message: string + message: string | null } export class AriesAskarError extends Error { public readonly code: number - public readonly extra?: string - public constructor({ code, message, extra }: AriesAskarErrorObject) { - super(message) + public constructor({ code, message }: AriesAskarErrorObject) { + super(message ?? 'No message provided from Aries Askar') this.code = code - this.extra = extra } public static customError({ message }: { message: string }) { From 8719c75f93fbeec7bebe12eeb5f6fd5fffc63efc Mon Sep 17 00:00:00 2001 From: Berend Sliedrecht Date: Tue, 19 Dec 2023 18:20:26 +0100 Subject: [PATCH 2/5] build(android): locked install for cross Signed-off-by: Berend Sliedrecht --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 954505ac..e0229fd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,7 +68,7 @@ jobs: - if: ${{ runner.os == 'Linux' }} name: Pre-install cross run: | - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross tests: name: Run tests @@ -163,7 +163,7 @@ jobs: shell: sh run: | if [ -n "${{ matrix.use_cross }}" ]; then - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross # Required for compatibility with manylinux2014. # https://github.com/briansmith/ring/issues/1728 if [ "${{ matrix.architecture }}" = "linux-aarch64" ]; then @@ -431,7 +431,7 @@ jobs: - name: Build run: | - cargo install --bins --git https://github.com/rust-embedded/cross --tag v${{ env.CROSS_VERSION }} cross + cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross # Required for compatibility with manylinux2014: # https://github.com/briansmith/ring/issues/1728 if [ "${{ matrix.target }}" = "aarch64-linux-android" ]; then From 37b264649e15bc8147728088442f90c8ba71313f Mon Sep 17 00:00:00 2001 From: Berend Sliedrecht Date: Wed, 20 Dec 2023 10:58:01 +0100 Subject: [PATCH 3/5] chore: include lock file for android builds Signed-off-by: Berend Sliedrecht --- .gitignore | 1 - Cargo.lock | 2952 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2952 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock diff --git a/.gitignore b/.gitignore index 821b8191..9a26b4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ target *.bak.db *.db-shm *.db-wal -Cargo.lock .DS_Store *.tgz *.so diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..8556d8eb --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2952 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + +[[package]] +name = "argon2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ba4cac0a46bc1d2912652a751c47f2a9f3a7fe89bcae2275d418f5270402f9" +dependencies = [ + "base64ct", + "blake2", + "cpufeatures", + "password-hash", +] + +[[package]] +name = "aries-askar" +version = "0.3.0" +dependencies = [ + "askar-crypto", + "askar-storage", + "async-lock", + "criterion", + "env_logger", + "ffi-support", + "jemallocator", + "log", + "once_cell", + "rand", + "serde", + "serde_cbor", + "serde_json", + "zeroize", +] + +[[package]] +name = "askar-crypto" +version = "0.3.0" +dependencies = [ + "aead", + "aes", + "aes-gcm", + "arbitrary", + "argon2", + "base64", + "blake2", + "block-modes", + "bls12_381", + "cbc", + "chacha20", + "chacha20poly1305", + "cipher", + "criterion", + "crypto_box", + "curve25519-dalek", + "digest", + "ed25519-dalek", + "elliptic-curve", + "group", + "hex-literal", + "hkdf", + "hmac", + "k256", + "p256", + "p384", + "rand", + "serde", + "serde-json-core", + "serde_cbor", + "sha2", + "subtle", + "x25519-dalek", + "zeroize", +] + +[[package]] +name = "askar-storage" +version = "0.1.0" +dependencies = [ + "arc-swap", + "askar-crypto", + "async-lock", + "async-stream", + "bs58", + "chrono", + "digest", + "env_logger", + "futures-lite", + "hex", + "hex-literal", + "hmac", + "itertools 0.11.0", + "log", + "once_cell", + "percent-encoding", + "rand", + "rmp-serde", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "sqlx", + "tokio", + "url", + "uuid", + "zeroize", +] + +[[package]] +name = "async-lock" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +dependencies = [ + "event-listener 4.0.1", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-stream" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-write-file" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" +dependencies = [ + "nix", + "rand", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-modes" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2211b0817f061502a8dd9f11a37e879e79763e3c698d2418cf824d8cb2f21e" + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bls12_381" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" +dependencies = [ + "ff", + "group", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cast" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + +[[package]] +name = "chrono" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", + "zeroize", +] + +[[package]] +name = "clap" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "concurrent-queue" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "criterion" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +dependencies = [ + "anes", + "cast", + "ciborium", + "clap", + "criterion-plot", + "is-terminal", + "itertools 0.10.5", + "num-traits", + "once_cell", + "oorandom", + "plotters", + "rayon", + "regex", + "serde", + "serde_derive", + "serde_json", + "tinytemplate", + "walkdir", +] + +[[package]] +name = "criterion-plot" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +dependencies = [ + "cast", + "itertools 0.10.5", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core", + "typenum", +] + +[[package]] +name = "crypto_box" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16182b4f39a82ec8a6851155cc4c0cda3065bb1db33651726a29e1951de0f009" +dependencies = [ + "aead", + "crypto_secretbox", + "curve25519-dalek", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto_secretbox" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d6cf87adf719ddf43a805e92c6870a531aedda35ff640442cbaf8674e141e1" +dependencies = [ + "aead", + "cipher", + "generic-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +dependencies = [ + "curve25519-dalek", + "ed25519", + "sha2", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +dependencies = [ + "serde", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "env_logger" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f2cdcf274580f2d63697192d744727b3198894b1bf02923643bf59e2c26712" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.1", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "ffi-support" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27838c6815cfe9de2d3aeb145ffd19e565f577414b33f3bdbf42fe040e9e0ff6" +dependencies = [ + "lazy_static", + "log", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" + +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "spin 0.9.8", +] + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" + +[[package]] +name = "futures-executor" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" + +[[package]] +name = "futures-lite" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-sink" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" + +[[package]] +name = "futures-task" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" + +[[package]] +name = "futures-util" +version = "0.3.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "ghash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "block-padding", + "generic-array", +] + +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6c1946e1cea1788cbfde01c993b52a10e2da07f4bac608228d1bed20bfebf2" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0de374a9f8e63150e6f5e8a60cc14c668226d7a347d8aee1a45766e3c4dd3bc" +dependencies = [ + "jemalloc-sys", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] + +[[package]] +name = "libc" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libsqlite3-sys" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +dependencies = [ + "byteorder", + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "platforms" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" + +[[package]] +name = "plotters" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" +dependencies = [ + "num-traits", + "plotters-backend", + "plotters-svg", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + +[[package]] +name = "proc-macro2" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "regex" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted", + "windows-sys 0.48.0", +] + +[[package]] +name = "rmp" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rsa" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" + +[[package]] +name = "serde" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-json-core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9e1ab533c0bc414c34920ec7e5f097101d126ed5eac1a1aac711222e0bbb33" +dependencies = [ + "ryu", + "serde", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.193" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "serde_json" +version = "1.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlformat" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" +dependencies = [ + "itertools 0.12.0", + "nom", + "unicode_categories", +] + +[[package]] +name = "sqlx" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +dependencies = [ + "ahash", + "atoi", + "byteorder", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "dotenvy", + "either", + "event-listener 2.5.3", + "futures-channel", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashlink", + "hex", + "indexmap", + "log", + "memchr", + "once_cell", + "paste", + "percent-encoding", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlformat", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots", +] + +[[package]] +name = "sqlx-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 1.0.109", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +dependencies = [ + "atomic-write-file", + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 1.0.109", + "tempfile", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" +dependencies = [ + "atoi", + "base64", + "bitflags 2.4.1", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +dependencies = [ + "atoi", + "base64", + "bitflags 2.4.1", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand", + "serde", + "serde_json", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "sqlx-core", + "tracing", + "url", + "urlencoding", +] + +[[package]] +name = "stringprep" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +dependencies = [ + "finl_unicode", + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + +[[package]] +name = "termcolor" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "thiserror" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.51" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "tinytemplate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +dependencies = [ + "getrandom", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" + +[[package]] +name = "web-sys" +version = "0.3.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" + +[[package]] +name = "whoami" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "x25519-dalek" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" +dependencies = [ + "curve25519-dalek", + "rand_core", + "zeroize", +] + +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] From 531ac1767a330bdd03ddcb4c085412432bb0aa04 Mon Sep 17 00:00:00 2001 From: Berend Sliedrecht Date: Wed, 20 Dec 2023 11:05:19 +0100 Subject: [PATCH 4/5] chore(js): resolved feedback to stay consistent between rn and nodejs Signed-off-by: Berend Sliedrecht --- Cargo.lock | 6 +++--- .../aries-askar-nodejs/src/NodeJSAriesAskar.ts | 6 +++++- .../src/ReactNativeAriesAskar.ts | 16 +++++++--------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8556d8eb..6090ecc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1183,11 +1183,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts b/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts index 961e6888..61997721 100644 --- a/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts +++ b/wrappers/javascript/aries-askar-nodejs/src/NodeJSAriesAskar.ts @@ -200,7 +200,11 @@ export class NodeJSAriesAskar implements AriesAskar { if (errorCode === 0) return const error = this.getCurrentError() - if (error.code === 0) return + if (error.code !== errorCode) { + throw AriesAskarError.customError({ + message: `Error code mismatch. Function received: '${errorCode}', but after fetch it was '${error.code}'`, + }) + } throw new AriesAskarError(error) } diff --git a/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts b/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts index ddc691db..cc13d7fb 100644 --- a/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts +++ b/wrappers/javascript/aries-askar-react-native/src/ReactNativeAriesAskar.ts @@ -104,24 +104,22 @@ export class ReactNativeAriesAskar implements AriesAskar { throw new AriesAskarError(this.getCurrentError()) } - private promisify = (method: (cb: Callback) => void): Promise => { + private promisify(method: (cb: Callback) => void): Promise { return new Promise((resolve, reject) => { const _cb: Callback = ({ errorCode }) => { - if (errorCode !== 0) { - const error = this.getCurrentError() - reject(new AriesAskarError(error)) + try { + this.handleError({ errorCode }) + resolve() + } catch (e) { + reject(e) } - - resolve() } method(_cb) }) } - private promisifyWithResponse = ( - method: (cb: CallbackWithResponse) => void - ): Promise => { + private promisifyWithResponse(method: (cb: CallbackWithResponse) => void): Promise { return new Promise((resolve, reject) => { const _cb: CallbackWithResponse = ({ errorCode, value }) => { if (errorCode !== 0) { From 826c04f4cae2881669994a8072b0e1ad1c4ec38b Mon Sep 17 00:00:00 2001 From: Timo Glastra Date: Thu, 21 Dec 2023 14:00:22 +0700 Subject: [PATCH 5/5] chore(js): update version to dev.4 Signed-off-by: Timo Glastra --- wrappers/javascript/aries-askar-nodejs/package.json | 4 ++-- .../javascript/aries-askar-react-native/package.json | 4 ++-- wrappers/javascript/aries-askar-shared/package.json | 2 +- wrappers/javascript/lerna.json | 9 ++------- wrappers/javascript/package.json | 3 +-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/wrappers/javascript/aries-askar-nodejs/package.json b/wrappers/javascript/aries-askar-nodejs/package.json index 1ee47304..86ec0449 100644 --- a/wrappers/javascript/aries-askar-nodejs/package.json +++ b/wrappers/javascript/aries-askar-nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@hyperledger/aries-askar-nodejs", - "version": "0.2.0-dev.3", + "version": "0.2.0-dev.4", "license": "Apache-2.0", "description": "Nodejs wrapper for Aries Askar", "source": "src/index", @@ -48,7 +48,7 @@ "dependencies": { "@2060.io/ffi-napi": "4.0.8", "@2060.io/ref-napi": "3.0.6", - "@hyperledger/aries-askar-shared": "0.2.0-dev.3", + "@hyperledger/aries-askar-shared": "0.2.0-dev.4", "@mapbox/node-pre-gyp": "^1.0.10", "node-cache": "^5.1.2", "ref-array-di": "^1.2.2", diff --git a/wrappers/javascript/aries-askar-react-native/package.json b/wrappers/javascript/aries-askar-react-native/package.json index 58af5361..05cffb2c 100644 --- a/wrappers/javascript/aries-askar-react-native/package.json +++ b/wrappers/javascript/aries-askar-react-native/package.json @@ -1,6 +1,6 @@ { "name": "@hyperledger/aries-askar-react-native", - "version": "0.2.0-dev.3", + "version": "0.2.0-dev.4", "license": "Apache-2.0", "description": "React Native wrapper for Aries Askar", "main": "build/index", @@ -35,7 +35,7 @@ "install": "node-pre-gyp install" }, "dependencies": { - "@hyperledger/aries-askar-shared": "0.2.0-dev.3", + "@hyperledger/aries-askar-shared": "0.2.0-dev.4", "@mapbox/node-pre-gyp": "^1.0.10" }, "devDependencies": { diff --git a/wrappers/javascript/aries-askar-shared/package.json b/wrappers/javascript/aries-askar-shared/package.json index 85309ddb..32bbcaf1 100644 --- a/wrappers/javascript/aries-askar-shared/package.json +++ b/wrappers/javascript/aries-askar-shared/package.json @@ -1,6 +1,6 @@ { "name": "@hyperledger/aries-askar-shared", - "version": "0.2.0-dev.3", + "version": "0.2.0-dev.4", "license": "Apache-2.0", "description": "Shared library for using Aries Askar with NodeJS and React Native", "main": "build/index", diff --git a/wrappers/javascript/lerna.json b/wrappers/javascript/lerna.json index 094879a0..9a0fa1fc 100644 --- a/wrappers/javascript/lerna.json +++ b/wrappers/javascript/lerna.json @@ -1,9 +1,4 @@ { - "version": "0.2.0-dev.3", - "npmClient": "yarn", - "command": { - "version": { - "allowBranch": ["main"] - } - } + "version": "0.2.0-dev.4", + "npmClient": "yarn" } diff --git a/wrappers/javascript/package.json b/wrappers/javascript/package.json index 857940e7..d976f542 100644 --- a/wrappers/javascript/package.json +++ b/wrappers/javascript/package.json @@ -24,8 +24,7 @@ "shared": "yarn --cwd aries-askar-shared", "nodejs": "yarn --cwd aries-askar-nodejs", "test": "cross-env yarn nodejs test", - "test:local-build": "cross-env LIB_ARIES_ASKAR_PATH=../../../target/release yarn test", - "set-version": "npx lerna version --exact --no-git-tag-version --no-push --yes" + "test:local-build": "cross-env LIB_ARIES_ASKAR_PATH=../../../target/release yarn test" }, "repository": { "type": "git",