mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-29 08:06:47 +00:00
878 lines
55 KiB
C
878 lines
55 KiB
C
/* Generated by Nim Compiler v1.2.6 */
|
|
/* (c) 2020 Andreas Rumpf */
|
|
/* The generated code is subject to the original license. */
|
|
/* Compiled for: Linux, amd64, gcc */
|
|
/* Command for C compiler:
|
|
gcc -c -w -pthread -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace -I/home/runner/work/nim-waku/nim-waku/vendor/nim-libbacktrace/install/usr/include -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/src -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/inc -I/home/runner/work/nim-waku/nim-waku/vendor/nim-bearssl/bearssl/csources/tools -DBR_USE_UNIX_TIME=1 -DBR_USE_URANDOM=1 -DBR_LE_UNALIGNED=1 -DBR_64=1 -DBR_amd64=1 -DBR_INT128=1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1 -I/home/runner/work/nim-waku/nim-waku/vendor/nim-secp256k1/secp256k1_wrapper/secp256k1/src -DHAVE_CONFIG_H -DHAVE_BUILTIN_EXPECT -march=native -g3 -Og -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib -I/home/runner/work/nim-waku/nim-waku/waku/v2/node -o nimcache/release/start_network2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@scrypto@srsa.nim.c.o nimcache/release/start_network2/@m..@s..@s..@svendor@snim-libp2p@slibp2p@scrypto@srsa.nim.c */
|
|
#define NIM_INTBITS 64
|
|
|
|
#include "nimbase.h"
|
|
#include "bearssl_rsa.h"
|
|
#include <sys/types.h>
|
|
#include <pthread.h>
|
|
#include <string.h>
|
|
#undef LANGUAGE_C
|
|
#undef MIPSEB
|
|
#undef MIPSEL
|
|
#undef PPC
|
|
#undef R3000
|
|
#undef R4000
|
|
#undef i386
|
|
#undef linux
|
|
#undef mips
|
|
#undef near
|
|
#undef far
|
|
#undef powerpc
|
|
#undef unix
|
|
#define nimfr_(x, y)
|
|
#define nimln_(x, y)
|
|
typedef struct tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg;
|
|
typedef struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ tySequence__6H5Oh5UUvVCLiakt9aTwtUQ;
|
|
typedef struct TNimType TNimType;
|
|
typedef struct TNimNode TNimNode;
|
|
typedef struct tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw;
|
|
typedef struct NimStringDesc NimStringDesc;
|
|
typedef struct TGenericSeq TGenericSeq;
|
|
typedef struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
|
|
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
|
|
typedef struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
|
|
typedef struct tyObject_GcStack__7fytPA5bBsob6See21YMRA tyObject_GcStack__7fytPA5bBsob6See21YMRA;
|
|
typedef struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
|
|
typedef struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
|
|
typedef struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
|
|
typedef struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
|
|
typedef struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
|
|
typedef struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
|
|
typedef struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
|
|
typedef struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
|
|
typedef struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
|
|
typedef struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
|
|
typedef struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
|
|
typedef struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
|
|
typedef struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw;
|
|
typedef struct tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg;
|
|
typedef struct tyObject_Result__SyOVenwKrVcTdMbQDaxDXw tyObject_Result__SyOVenwKrVcTdMbQDaxDXw;
|
|
typedef struct tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg;
|
|
typedef struct tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA;
|
|
typedef struct RootObj RootObj;
|
|
typedef struct tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg;
|
|
struct tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg {tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* buffer;
|
|
br_rsa_public_key key;
|
|
};
|
|
typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
|
|
typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
|
|
typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
|
|
typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
|
|
struct TNimType {NI size;
|
|
tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
|
|
tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
|
|
TNimType* base;
|
|
TNimNode* node;
|
|
void* finalizer;
|
|
tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
|
|
tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
|
|
NCSTRING name;
|
|
TNimType* nextType;
|
|
NI instances;
|
|
NI sizes;
|
|
};
|
|
typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
|
|
struct TNimNode {tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
|
|
NI offset;
|
|
TNimType* typ;
|
|
NCSTRING name;
|
|
NI len;
|
|
TNimNode** sons;
|
|
};
|
|
struct TGenericSeq {NI len;
|
|
NI reserved;
|
|
};
|
|
struct NimStringDesc { TGenericSeq Sup;NIM_CHAR data[SEQ_DECL_SIZE];
|
|
};
|
|
struct tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw {tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* buffer;
|
|
br_rsa_private_key seck;
|
|
br_rsa_public_key pubk;
|
|
unsigned char* pexp;
|
|
NI pexplen;
|
|
};
|
|
struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {NI refcount;
|
|
TNimType* typ;
|
|
};
|
|
struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {void* bottom;
|
|
};
|
|
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {NI len;
|
|
NI cap;
|
|
tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
|
|
};
|
|
typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SiRwrEKZdLgxqz9a9aoVBglg[512];
|
|
typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
|
|
typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
|
|
typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
|
|
typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
|
|
struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
|
|
};
|
|
typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
|
|
struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {tyArray__0aOLqZchNi8nWtMTi8ND8w link;
|
|
NI key;
|
|
NI upperBound;
|
|
NI level;
|
|
};
|
|
struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
|
|
tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
|
|
NI Field1;
|
|
};
|
|
typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
|
|
struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {NI len;
|
|
tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
|
|
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
|
|
};
|
|
struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {NI minLargeObj;
|
|
NI maxLargeObj;
|
|
tyArray__SiRwrEKZdLgxqz9a9aoVBglg freeSmallChunks;
|
|
NU32 flBitmap;
|
|
tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
|
|
tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
|
|
tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
|
|
NI currMem;
|
|
NI maxMem;
|
|
NI freeMem;
|
|
NI occ;
|
|
NI lastSize;
|
|
tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
|
|
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
|
|
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
|
|
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
|
|
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
|
|
NIM_BOOL locked;
|
|
NIM_BOOL blockChunkSizeIncrease;
|
|
NI nextChunkSize;
|
|
tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
|
|
tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
|
|
NI allocCounter;
|
|
NI deallocCounter;
|
|
};
|
|
struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {NI stackScans;
|
|
NI cycleCollections;
|
|
NI maxThreshold;
|
|
NI maxStackSize;
|
|
NI maxStackCells;
|
|
NI cycleTableSize;
|
|
NI64 maxPause;
|
|
};
|
|
struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {NI counter;
|
|
NI max;
|
|
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
|
|
tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
|
|
};
|
|
typedef long tyArray__xDUyu9aScDpt0JZLU6q9aEZQ[5];
|
|
struct tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw {tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* head;
|
|
tyObject_SharedListNodecolonObjectType___KGw0YAw6W9aSz3Sr9aXGu7zg* tail;
|
|
pthread_mutex_t lock;
|
|
};
|
|
struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
|
|
NI cycleThreshold;
|
|
NI zctThreshold;
|
|
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
|
|
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
|
|
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
|
|
NI recGcLock;
|
|
tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
|
|
tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
|
|
tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
|
|
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
|
|
tyObject_SharedList__JI9cx34TL8n3aOKF6tSMBUw toDispose;
|
|
NI gcThreadId;
|
|
};
|
|
typedef NU8 tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g;
|
|
struct tyObject_Result__SyOVenwKrVcTdMbQDaxDXw {NIM_BOOL o;
|
|
union{
|
|
struct {tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g e;
|
|
} _o_1;
|
|
struct {tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* v;
|
|
} _o_2;
|
|
};
|
|
};
|
|
struct tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg {NIM_BOOL o;
|
|
union{
|
|
struct {tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g e;
|
|
} _o_1;
|
|
struct {NI v;
|
|
} _o_2;
|
|
};
|
|
};
|
|
struct RootObj {TNimType* m_type;};
|
|
struct tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA { RootObj Sup;tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* buffer;
|
|
NI offset;
|
|
NI length;
|
|
};
|
|
typedef NU8 tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg;
|
|
struct tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg { tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA Sup;tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg tag;
|
|
NI idx;
|
|
};
|
|
typedef NU8 tyArray__uYfjWrg9aQEzxu9cIodNDptA[9];
|
|
struct tySequence__6H5Oh5UUvVCLiakt9aTwtUQ { TGenericSeq Sup; NU8 data[SEQ_DECL_SIZE];};N_LIB_PRIVATE N_NIMCALL(void, nimGCvisit)(void* d, NI op);
|
|
static N_NIMCALL(void, Marker_tyRef__2OoLEoAqWG9c1IoFZfCQ23Q)(void* p, NI op);
|
|
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseOverflow)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg*, new__hKZgxTlJ0b9bIZ9cusYv5FhQ)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*, newSeq__DpCWN7DIBuAjgoeQ9c29blYQ)(NI len_0);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseRangeErrorI)(NI64 i, NI64 a, NI64 b);
|
|
static N_INLINE(void, asgnRef)(void** dest, void* src);
|
|
static N_INLINE(void, incRef__AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
|
|
static N_INLINE(NI, pluspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y);
|
|
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr);
|
|
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y);
|
|
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
|
|
static N_INLINE(NIM_BOOL, ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem)(NI x, NI y);
|
|
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
|
|
N_LIB_PRIVATE N_NOINLINE(void, addZCT__Y66tOYFjgwJ0k4aLz4bc0Q)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError2)(NI i, NI n);
|
|
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size);
|
|
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
|
|
static N_NIMCALL(void, Marker_tyRef__YsrjeG6VWJ0XFJD22jLsWA)(void* p, NI op);
|
|
N_LIB_PRIVATE N_NOINLINE(void, chckNil)(void* p);
|
|
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg, toBytes__1ud7Zqf821w9bfl9c3kKwPCg)(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg* key_0, NU8* data_0, NI data_0Len_0);
|
|
static N_INLINE(void, nimZeroMem)(void* p, NI size);
|
|
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
|
|
N_LIB_PRIVATE N_NIMCALL(void, init__5Ms8XzuU9bg8ecal9ab5MTdA)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(void, init__LR9a2q5Zt539ayB5EKEiJF0g)(tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg tag, tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* Result);
|
|
N_LIB_PRIVATE N_NIMCALL(void, write__z4GCG5BGgGHOIZoLtw5rAw)(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* abc, tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg tag, NU8* value_0, NI value_0Len_0, NI bits);
|
|
N_LIB_PRIVATE N_NIMCALL(void, write__DY9aRrcfMuIFKGJyT9aeTZSA)(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* abc, tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg tag);
|
|
static N_INLINE(void, finish__YlPrmyIivjUbyxfbA1I5fgminasn1)(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* abc);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseIndexError)(void);
|
|
N_LIB_PRIVATE N_NIMCALL(void, write__p2xmP7GdD5UO3rNa9cmx12w)(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* abc, tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* value_0);
|
|
N_LIB_PRIVATE N_NIMCALL(void, write__HuWLOlu2X16vPWQ3bSZ3nA)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* abc, tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* value_0);
|
|
static N_INLINE(void, finish__TiT6vNUOGDpqGhiAzvnzNwminasn1)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* abc);
|
|
static N_INLINE(NI, len__BfeAsaNk9bNqZpKX8OkRGnQminasn1)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* abc);
|
|
N_LIB_PRIVATE N_NOINLINE(void, raiseFieldError)(NimStringDesc* f);
|
|
N_LIB_PRIVATE N_NIMCALL(TGenericSeq*, setLengthSeqV2)(TGenericSeq* s, TNimType* typ, NI newLen);
|
|
N_LIB_PRIVATE N_NIMCALL(void, genericSeqAssign)(void* dest_0, void* src, TNimType* mt);
|
|
N_LIB_PRIVATE TNimType NTI__cEZIZ6MRRYNM7g7RvdoBpg_;
|
|
extern TNimType NTI__6H5Oh5UUvVCLiakt9aTwtUQ_;
|
|
extern TNimType NTI__a9bHzZTzNRPC7VJ7yppQCuQ_;
|
|
N_LIB_PRIVATE TNimType NTI__2OoLEoAqWG9c1IoFZfCQ23Q_;
|
|
STRING_LITERAL(TM__9b9bhChyVhesk0GF7InzPt4A_3, "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/cr"
|
|
"ypto/rsa.nim(230, 11) `not isNil(key)` ", 102);
|
|
N_LIB_PRIVATE TNimType NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_;
|
|
extern TNimType NTI__tnWvqP0WIATHx1gb609c2sg_;
|
|
extern TNimType NTI__TMujUAuMhbuOEctXLTkMyA_;
|
|
extern TNimType NTI__rR5Bzr1D5krxoo1NcNyeMA_;
|
|
N_LIB_PRIVATE TNimType NTI__YsrjeG6VWJ0XFJD22jLsWA_;
|
|
extern TNimType NTI__a5EmYcJjKFxSSJOn8BKx9bA_;
|
|
extern TNimType NTI__nDo9cwlNrRu8ntu170HnAFg_;
|
|
static NIM_CONST tyArray__uYfjWrg9aQEzxu9cIodNDptA TM__9b9bhChyVhesk0GF7InzPt4A_6 = {((NU8) 42),
|
|
((NU8) 134),
|
|
((NU8) 72),
|
|
((NU8) 134),
|
|
((NU8) 247),
|
|
((NU8) 13),
|
|
((NU8) 1),
|
|
((NU8) 1),
|
|
((NU8) 1)}
|
|
;
|
|
STRING_LITERAL(TM__9b9bhChyVhesk0GF7InzPt4A_14, "\'e\' is not accessible using discriminant \'o\' of type \'Result\'", 61);
|
|
STRING_LITERAL(TM__9b9bhChyVhesk0GF7InzPt4A_15, "\'v\' is not accessible using discriminant \'o\' of type \'Result\'", 61);
|
|
extern TNimType* nimTypeRoot;
|
|
extern NIM_THREADVAR tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__IcYaEuuWivYAS86vFMTS3Q;
|
|
static N_NIMCALL(void, Marker_tyRef__2OoLEoAqWG9c1IoFZfCQ23Q)(void* p, NI op) {
|
|
tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg* a;
|
|
a = (tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg*)p;
|
|
nimGCvisit((void*)(*a).buffer, op);}
|
|
|
|
#line 425 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
static N_INLINE(NI, pluspercent___dgYAo7RfdUVVpvkfKDym8wsystem)(NI x, NI y) { NI result; result = (NI)0;
|
|
#line 426 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
|
|
#line 430 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y)))))); return result;}
|
|
|
|
#line 182 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
static N_INLINE(void, incRef__AT1eRuflKWyTTBdLjEDZbg_3system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
|
|
#line 184 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 184 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
(*c).refcount = pluspercent___dgYAo7RfdUVVpvkfKDym8wsystem((*c).refcount, ((NI) 8));}
|
|
|
|
#line 436 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
static N_INLINE(NI, minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system)(NI x, NI y) { NI result; result = (NI)0;
|
|
#line 437 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
|
|
#line 441 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/arithmetics.nim"
|
|
result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y)))))); return result;}
|
|
|
|
#line 128 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem)(void* usr) { tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result; NI T1_; result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
|
|
#line 130 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 130 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 130 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
T1_ = (NI)0; T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system(((NI) (ptrdiff_t) (usr)), ((NI) 16)); result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_)); return result;}
|
|
|
|
#line 187 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/comparisons.nim"
|
|
static N_INLINE(NIM_BOOL, ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem)(NI x, NI y) { NIM_BOOL result; result = (NIM_BOOL)0;
|
|
#line 188 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/comparisons.nim"
|
|
|
|
#line 190 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/comparisons.nim"
|
|
result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y)))); return result;}
|
|
|
|
#line 194 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
static N_INLINE(void, rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
|
|
#line 196 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 196 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
addZCT__Y66tOYFjgwJ0k4aLz4bc0Q((&gch__IcYaEuuWivYAS86vFMTS3Q.zct), c);
|
|
}
|
|
|
|
#line 198 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
static N_INLINE(void, decRef__AT1eRuflKWyTTBdLjEDZbgsystem)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
|
|
#line 201 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 201 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
(*c).refcount = minuspercent___dgYAo7RfdUVVpvkfKDym8w_2system((*c).refcount, ((NI) 8));
|
|
#line 202 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
{ NIM_BOOL T3_;
|
|
#line 202 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 202 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
T3_ = (NIM_BOOL)0; T3_ = ltpercent___hPljn3JCDQ00ua1R07X9bxQsystem((*c).refcount, ((NI) 8)); if (!T3_) goto LA4_;
|
|
|
|
#line 203 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 203 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
rtlAddZCT__AT1eRuflKWyTTBdLjEDZbg_2system(c);
|
|
}
|
|
LA4_: ;
|
|
}
|
|
|
|
#line 235 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
static N_INLINE(void, asgnRef)(void** dest, void* src) {
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
{ tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_;
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
if (!!((src == NIM_NIL))) goto LA3_;
|
|
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
T5_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0; T5_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem(src);
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
incRef__AT1eRuflKWyTTBdLjEDZbg_3system(T5_);
|
|
}
|
|
LA3_: ;
|
|
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
{ tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_;
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
if (!!(((*dest) == NIM_NIL))) goto LA8_;
|
|
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
T10_ = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0; T10_ = usrToCell__QFQqcLB3lgOdwipkv9a60xwsystem((*dest));
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
decRef__AT1eRuflKWyTTBdLjEDZbgsystem(T10_);
|
|
}
|
|
LA8_: ;
|
|
|
|
#line 241 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/gc.nim"
|
|
(*dest) = src;}
|
|
|
|
#line 11 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) { void* T1_;
|
|
#line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
|
|
#line 13 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
T1_ = (void*)0; T1_ = memcpy(dest, source, ((size_t) (size)));}
|
|
|
|
#line 2112 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
|
|
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
|
|
#line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
|
|
|
|
#line 2113 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system.nim"
|
|
nimCopyMem(dest, source, size);
|
|
}
|
|
|
|
#line 228 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg*, getKey__cfVOJ9aZzO18vUXesNDNxaQ)(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw* key_0) { tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg* result; NI length; NI TM__9b9bhChyVhesk0GF7InzPt4A_4; result = (tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg*)0;
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!!(!((key_0 == 0)))) goto LA3_;
|
|
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 230 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__9b9bhChyVhesk0GF7InzPt4A_3));
|
|
}
|
|
LA3_: ;
|
|
|
|
#line 231 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 231 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (nimAddInt((*key_0).pubk.nlen, (*key_0).pubk.elen, &TM__9b9bhChyVhesk0GF7InzPt4A_4)) { raiseOverflow(); }; length = (NI)(TM__9b9bhChyVhesk0GF7InzPt4A_4);
|
|
#line 232 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 232 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
result = new__hKZgxTlJ0b9bIZ9cusYv5FhQ();
|
|
#line 233 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((length) < ((NI) 0) || (length) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(length, ((NI) 0), ((NI) IL64(9223372036854775807))); }
|
|
#line 233 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
asgnRef((void**) (&(*result).buffer), newSeq__DpCWN7DIBuAjgoeQ9c29blYQ(((NI) (length))));
|
|
#line 234 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*result).buffer ? (*result).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*result).buffer ? (*result).buffer->Sup.len : 0)-1); } (*result).key.n = ((unsigned char*) ((&(*result).buffer->data[((NI) 0)])));
|
|
#line 235 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)((*key_0).pubk.nlen) >= (NU)((*result).buffer ? (*result).buffer->Sup.len : 0)){ raiseIndexError2((*key_0).pubk.nlen,((*result).buffer ? (*result).buffer->Sup.len : 0)-1); } (*result).key.e = ((unsigned char*) ((&(*result).buffer->data[(*key_0).pubk.nlen])));
|
|
#line 236 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*result).buffer ? (*result).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*result).buffer ? (*result).buffer->Sup.len : 0)-1); } if (((*key_0).pubk.nlen) < ((NI) 0) || ((*key_0).pubk.nlen) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((*key_0).pubk.nlen, ((NI) 0), ((NI) IL64(9223372036854775807))); }
|
|
#line 236 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*result).buffer->data[((NI) 0)]))), ((void*) ((*key_0).pubk.n)), ((NI) ((*key_0).pubk.nlen)));
|
|
|
|
#line 237 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)((*key_0).pubk.nlen) >= (NU)((*result).buffer ? (*result).buffer->Sup.len : 0)){ raiseIndexError2((*key_0).pubk.nlen,((*result).buffer ? (*result).buffer->Sup.len : 0)-1); } if (((*key_0).pubk.elen) < ((NI) 0) || ((*key_0).pubk.elen) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI((*key_0).pubk.elen, ((NI) 0), ((NI) IL64(9223372036854775807))); }
|
|
#line 237 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&(*result).buffer->data[(*key_0).pubk.nlen]))), ((void*) ((*key_0).pubk.e)), ((NI) ((*key_0).pubk.elen)));
|
|
|
|
#line 239 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
(*result).key.nlen = (*key_0).pubk.nlen;
|
|
#line 240 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
(*result).key.elen = (*key_0).pubk.elen; return result;}
|
|
static N_NIMCALL(void, Marker_tyRef__YsrjeG6VWJ0XFJD22jLsWA)(void* p, NI op) {
|
|
tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw* a;
|
|
a = (tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw*)p;
|
|
nimGCvisit((void*)(*a).buffer, op);}
|
|
|
|
#line 22 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) { void* T1_;
|
|
#line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
|
|
#line 24 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
T1_ = (void*)0; T1_ = memset(a, v, ((size_t) (size)));}
|
|
|
|
#line 33 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
|
|
#line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
|
|
#line 34 "/home/runner/work/nim-waku/nim-waku/vendor/nimbus-build-system/vendor/Nim/lib/system/memory.nim"
|
|
nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
|
|
}
|
|
|
|
#line 874 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
static N_INLINE(void, finish__YlPrmyIivjUbyxfbA1I5fgminasn1)(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg* abc) {
|
|
#line 876 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
(*abc).Sup.offset = ((NI) 0);}
|
|
|
|
#line 874 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
static N_INLINE(void, finish__TiT6vNUOGDpqGhiAzvnzNwminasn1)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* abc) {
|
|
#line 876 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
(*abc).offset = ((NI) 0);}
|
|
|
|
#line 122 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
static N_INLINE(NI, len__BfeAsaNk9bNqZpKX8OkRGnQminasn1)(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA* abc) { NI result; NI T1_; NI TM__9b9bhChyVhesk0GF7InzPt4A_13; result = (NI)0;
|
|
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
|
|
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
|
|
#line 123 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/minasn1.nim"
|
|
T1_ = ((*abc).buffer ? (*abc).buffer->Sup.len : 0); if (nimSubInt(T1_, (*abc).offset, &TM__9b9bhChyVhesk0GF7InzPt4A_13)) { raiseOverflow(); }; result = (NI)(TM__9b9bhChyVhesk0GF7InzPt4A_13); return result;}
|
|
|
|
#line 319 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg, toBytes__1ud7Zqf821w9bfl9c3kKwPCg)(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg* key_0, NU8* data_0, NI data_0Len_0) { tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg result; nimZeroMem((void*)(&result), sizeof(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg));
|
|
#line 320 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 325 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 325 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!(key_0 == 0)) goto LA3_;
|
|
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g) 1); }
|
|
goto LA1_;
|
|
LA3_: ;
|
|
{ NI T6_; tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA b; tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg p_1; tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg c0; tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg c1; tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg c10; NU pX60gensym48255002_; NU sX60gensym48255003_; NI soX60gensym48255004_; NU pX60gensym48265001_; NU sX60gensym48265002_; NI eoX60gensym48265003_; NU pX60gensym48280002_; NU sX60gensym48280003_; NI soX60gensym48280004_; NU pX60gensym48290001_; NU sX60gensym48290002_; NI eoX60gensym48290003_; NI blen;
|
|
#line 327 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 327 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
T6_ = ((*key_0).buffer ? (*key_0).buffer->Sup.len : 0); if (!(((NI) 0) < T6_)) goto LA7_;
|
|
nimZeroMem((void*)(&b), sizeof(tyObject_Asn1Buffer__a5EmYcJjKFxSSJOn8BKx9bA)); b.Sup.m_type = (&NTI__a5EmYcJjKFxSSJOn8BKx9bA_);
|
|
#line 328 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 328 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
init__5Ms8XzuU9bg8ecal9ab5MTdA((&b));
|
|
nimZeroMem((void*)(&p_1), sizeof(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg)); p_1.Sup.Sup.m_type = (&NTI__nDo9cwlNrRu8ntu170HnAFg_);
|
|
#line 329 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 329 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
init__LR9a2q5Zt539ayB5EKEiJF0g(((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 7), (&p_1));
|
|
nimZeroMem((void*)(&c0), sizeof(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg)); c0.Sup.Sup.m_type = (&NTI__nDo9cwlNrRu8ntu170HnAFg_);
|
|
#line 330 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 330 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
init__LR9a2q5Zt539ayB5EKEiJF0g(((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 7), (&c0));
|
|
nimZeroMem((void*)(&c1), sizeof(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg)); c1.Sup.Sup.m_type = (&NTI__nDo9cwlNrRu8ntu170HnAFg_);
|
|
#line 331 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 331 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
init__LR9a2q5Zt539ayB5EKEiJF0g(((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 3), (&c1));
|
|
nimZeroMem((void*)(&c10), sizeof(tyObject_Asn1Composite__nDo9cwlNrRu8ntu170HnAFg)); c10.Sup.Sup.m_type = (&NTI__nDo9cwlNrRu8ntu170HnAFg_);
|
|
#line 332 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 332 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
init__LR9a2q5Zt539ayB5EKEiJF0g(((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 7), (&c10));
|
|
|
|
#line 333 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 333 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__z4GCG5BGgGHOIZoLtw5rAw((&c0), ((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 6), TM__9b9bhChyVhesk0GF7InzPt4A_6, 9, ((NI) 0));
|
|
|
|
#line 334 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 334 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__DY9aRrcfMuIFKGJyT9aeTZSA((&c0), ((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 5));
|
|
|
|
#line 335 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 335 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
finish__YlPrmyIivjUbyxfbA1I5fgminasn1((&c0));
|
|
|
|
#line 336 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 89 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
pX60gensym48255002_ = ((NU) (ptrdiff_t) ((*key_0).key.n));
|
|
#line 90 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)-1); } sX60gensym48255003_ = ((NU) (ptrdiff_t) ((&(*key_0).buffer->data[((NI) 0)])));
|
|
#line 91 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48255004_ = ((NI) 0);
|
|
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!((NU64)(sX60gensym48255003_) <= (NU64)(pX60gensym48255002_))) goto LA11_;
|
|
|
|
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48255004_ = ((NI) ((NU)((NU64)(pX60gensym48255002_) - (NU64)(sX60gensym48255003_)))); }
|
|
LA11_: ;
|
|
|
|
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
pX60gensym48265001_ = ((NU) (ptrdiff_t) ((*key_0).key.n));
|
|
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)-1); } sX60gensym48265002_ = ((NU) (ptrdiff_t) ((&(*key_0).buffer->data[((NI) 0)])));
|
|
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
eoX60gensym48265003_ = ((NI) -1);
|
|
#line 100 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{ NI soX60gensym48265004_;
|
|
#line 100 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!((NU64)(sX60gensym48265002_) <= (NU64)(pX60gensym48265001_))) goto LA15_;
|
|
|
|
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48265004_ = ((NI) ((NU)((NU64)(pX60gensym48265001_) - (NU64)(sX60gensym48265002_))));
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{ NI TM__9b9bhChyVhesk0GF7InzPt4A_7; NI T19_; NI TM__9b9bhChyVhesk0GF7InzPt4A_8; NI TM__9b9bhChyVhesk0GF7InzPt4A_9;
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (nimAddInt(soX60gensym48265004_, (*key_0).key.nlen, &TM__9b9bhChyVhesk0GF7InzPt4A_7)) { raiseOverflow(); };
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
T19_ = ((*key_0).buffer ? (*key_0).buffer->Sup.len : 0); if (!((NI)(TM__9b9bhChyVhesk0GF7InzPt4A_7) <= T19_)) goto LA20_;
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (nimAddInt(soX60gensym48265004_, (*key_0).key.nlen, &TM__9b9bhChyVhesk0GF7InzPt4A_8)) { raiseOverflow(); }; if (nimSubInt((NI)(TM__9b9bhChyVhesk0GF7InzPt4A_8), ((NI) 1), &TM__9b9bhChyVhesk0GF7InzPt4A_9)) { raiseOverflow(); }; eoX60gensym48265003_ = (NI)(TM__9b9bhChyVhesk0GF7InzPt4A_9); }
|
|
LA20_: ;
|
|
}
|
|
LA15_: ;
|
|
if (eoX60gensym48265003_-soX60gensym48255004_ != -1 && ((NU)(soX60gensym48255004_) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0) || (NU)(eoX60gensym48265003_) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0))){ raiseIndexError(); }
|
|
#line 336 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__z4GCG5BGgGHOIZoLtw5rAw((&c10), ((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 2), (NU8*)(*key_0).buffer->data+(soX60gensym48255004_), (eoX60gensym48265003_)-(soX60gensym48255004_)+1, ((NI) 0));
|
|
|
|
#line 337 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 89 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
pX60gensym48280002_ = ((NU) (ptrdiff_t) ((*key_0).key.e));
|
|
#line 90 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)-1); } sX60gensym48280003_ = ((NU) (ptrdiff_t) ((&(*key_0).buffer->data[((NI) 0)])));
|
|
#line 91 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48280004_ = ((NI) 0);
|
|
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 92 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!((NU64)(sX60gensym48280003_) <= (NU64)(pX60gensym48280002_))) goto LA24_;
|
|
|
|
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 93 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48280004_ = ((NI) ((NU)((NU64)(pX60gensym48280002_) - (NU64)(sX60gensym48280003_)))); }
|
|
LA24_: ;
|
|
|
|
#line 97 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
pX60gensym48290001_ = ((NU) (ptrdiff_t) ((*key_0).key.e));
|
|
#line 98 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),((*key_0).buffer ? (*key_0).buffer->Sup.len : 0)-1); } sX60gensym48290002_ = ((NU) (ptrdiff_t) ((&(*key_0).buffer->data[((NI) 0)])));
|
|
#line 99 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
eoX60gensym48290003_ = ((NI) -1);
|
|
#line 100 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{ NI soX60gensym48290004_;
|
|
#line 100 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!((NU64)(sX60gensym48290002_) <= (NU64)(pX60gensym48290001_))) goto LA28_;
|
|
|
|
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 101 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
soX60gensym48290004_ = ((NI) ((NU)((NU64)(pX60gensym48290001_) - (NU64)(sX60gensym48290002_))));
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{ NI TM__9b9bhChyVhesk0GF7InzPt4A_10; NI T32_; NI TM__9b9bhChyVhesk0GF7InzPt4A_11; NI TM__9b9bhChyVhesk0GF7InzPt4A_12;
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (nimAddInt(soX60gensym48290004_, (*key_0).key.elen, &TM__9b9bhChyVhesk0GF7InzPt4A_10)) { raiseOverflow(); };
|
|
#line 102 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
T32_ = ((*key_0).buffer ? (*key_0).buffer->Sup.len : 0); if (!((NI)(TM__9b9bhChyVhesk0GF7InzPt4A_10) <= T32_)) goto LA33_;
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 103 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (nimAddInt(soX60gensym48290004_, (*key_0).key.elen, &TM__9b9bhChyVhesk0GF7InzPt4A_11)) { raiseOverflow(); }; if (nimSubInt((NI)(TM__9b9bhChyVhesk0GF7InzPt4A_11), ((NI) 1), &TM__9b9bhChyVhesk0GF7InzPt4A_12)) { raiseOverflow(); }; eoX60gensym48290003_ = (NI)(TM__9b9bhChyVhesk0GF7InzPt4A_12); }
|
|
LA33_: ;
|
|
}
|
|
LA28_: ;
|
|
if (eoX60gensym48290003_-soX60gensym48280004_ != -1 && ((NU)(soX60gensym48280004_) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0) || (NU)(eoX60gensym48290003_) >= (NU)((*key_0).buffer ? (*key_0).buffer->Sup.len : 0))){ raiseIndexError(); }
|
|
#line 337 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__z4GCG5BGgGHOIZoLtw5rAw((&c10), ((tyEnum_Asn1Tag__hBLeLVrzEfHzr0vieTv9ayg) 2), (NU8*)(*key_0).buffer->data+(soX60gensym48280004_), (eoX60gensym48290003_)-(soX60gensym48280004_)+1, ((NI) 0));
|
|
|
|
#line 338 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 338 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
finish__YlPrmyIivjUbyxfbA1I5fgminasn1((&c10));
|
|
|
|
#line 339 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 339 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__p2xmP7GdD5UO3rNa9cmx12w((&c1), (&c10));
|
|
|
|
#line 340 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 340 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
finish__YlPrmyIivjUbyxfbA1I5fgminasn1((&c1));
|
|
|
|
#line 341 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 341 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__p2xmP7GdD5UO3rNa9cmx12w((&p_1), (&c0));
|
|
|
|
#line 342 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 342 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__p2xmP7GdD5UO3rNa9cmx12w((&p_1), (&c1));
|
|
|
|
#line 343 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 343 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
finish__YlPrmyIivjUbyxfbA1I5fgminasn1((&p_1));
|
|
|
|
#line 344 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 344 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
write__HuWLOlu2X16vPWQ3bSZ3nA((&b), (&p_1));
|
|
|
|
#line 345 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 345 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
finish__TiT6vNUOGDpqGhiAzvnzNwminasn1((&b));
|
|
|
|
#line 346 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 346 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
blen = len__BfeAsaNk9bNqZpKX8OkRGnQminasn1((&b));
|
|
#line 347 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 347 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 347 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!(blen <= data_0Len_0)) goto LA37_;
|
|
|
|
#line 348 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((NU)(((NI) 0)) >= (NU)(data_0Len_0)){ raiseIndexError2(((NI) 0),data_0Len_0-1); } if ((NU)(((NI) 0)) >= (NU)(b.buffer ? b.buffer->Sup.len : 0)){ raiseIndexError2(((NI) 0),(b.buffer ? b.buffer->Sup.len : 0)-1); } if ((blen) < ((NI) 0) || (blen) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(blen, ((NI) 0), ((NI) IL64(9223372036854775807))); }
|
|
#line 348 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(((void*) ((&data_0[((NI) 0)]))), ((void*) ((&b.buffer->data[((NI) 0)]))), ((NI) (blen)));
|
|
}
|
|
LA37_: ;
|
|
chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg)); result.o = NIM_TRUE; result._o_2.v = blen; }
|
|
goto LA1_;
|
|
LA7_: ;
|
|
{ chckNil((void*)(&result)); nimZeroMem((void*)(&result), sizeof(tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg)); result.o = NIM_FALSE; result._o_1.e = ((tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g) 1); }
|
|
LA1_: ;
|
|
return result;}
|
|
|
|
#line 380 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
N_LIB_PRIVATE N_NIMCALL(void, getBytes__kJn7zWGJC57vhkb2K4XDbA)(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg* key_0, tyObject_Result__SyOVenwKrVcTdMbQDaxDXw* Result) { tySequence__6H5Oh5UUvVCLiakt9aTwtUQ* res; NI length; tyObject_Result__ImohbHdKc6OwoKfAuy4Lzg vX60gensym48445022_;{ chckNil((void*)Result); switch ((*Result).o) {
|
|
case NIM_FALSE:
|
|
(*Result)._o_1.e = 0; break;
|
|
case NIM_TRUE:
|
|
unsureAsgnRef((void**)&(*Result)._o_2.v, NIM_NIL); break;
|
|
}
|
|
(*Result).o = 0;
|
|
#line 381 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 383 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 383 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!(key_0 == 0)) goto LA3_;
|
|
|
|
#line 384 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 384 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
chckNil((void*)Result); switch ((*Result).o) {
|
|
case NIM_FALSE:
|
|
(*Result)._o_1.e = 0; break;
|
|
case NIM_TRUE:
|
|
unsureAsgnRef((void**)&(*Result)._o_2.v, NIM_NIL); break;
|
|
}
|
|
(*Result).o = 0; (*Result).o = NIM_FALSE; (*Result)._o_1.e = ((tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g) 1); goto BeforeRet_;
|
|
}
|
|
LA3_: ;
|
|
|
|
#line 385 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 385 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
res = newSeq__DpCWN7DIBuAjgoeQ9c29blYQ(((NI) 4096));
|
|
#line 386 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
|
|
#line 657 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/results.nim"
|
|
|
|
#line 386 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
vX60gensym48445022_ = toBytes__1ud7Zqf821w9bfl9c3kKwPCg(key_0, res->data, (res ? res->Sup.len : 0));
|
|
#line 658 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/results.nim"
|
|
{
|
|
#line 658 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/results.nim"
|
|
if (!!(vX60gensym48445022_.o)) goto LA7_;
|
|
|
|
#line 662 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/results.nim"
|
|
|
|
#line 662 "/home/runner/work/nim-waku/nim-waku/vendor/nim-stew/stew/results.nim"
|
|
chckNil((void*)Result); switch ((*Result).o) {
|
|
case NIM_FALSE:
|
|
(*Result)._o_1.e = 0; break;
|
|
case NIM_TRUE:
|
|
unsureAsgnRef((void**)&(*Result)._o_2.v, NIM_NIL); break;
|
|
}
|
|
(*Result).o = 0; (*Result).o = NIM_FALSE; if (!(((1 &(1U<<((NU)(vX60gensym48445022_.o)&7U)))!=0))){ raiseFieldError(((NimStringDesc*) &TM__9b9bhChyVhesk0GF7InzPt4A_14)); } (*Result)._o_1.e = vX60gensym48445022_._o_1.e; goto BeforeRet_;
|
|
}
|
|
LA7_: ;
|
|
if (!(((2 &(1U<<((NU)(vX60gensym48445022_.o)&7U)))!=0))){ raiseFieldError(((NimStringDesc*) &TM__9b9bhChyVhesk0GF7InzPt4A_15)); } length = vX60gensym48445022_._o_2.v;
|
|
#line 387 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
{
|
|
#line 387 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if (!(((NI) 0) < length)) goto LA11_;
|
|
|
|
#line 388 "/home/runner/work/nim-waku/nim-waku/vendor/nim-libp2p/libp2p/crypto/rsa.nim"
|
|
if ((length) < ((NI) 0) || (length) > ((NI) IL64(9223372036854775807))){ raiseRangeErrorI(length, ((NI) 0), ((NI) IL64(9223372036854775807))); } res = (tySequence__6H5Oh5UUvVCLiakt9aTwtUQ*) setLengthSeqV2(&(res)->Sup, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_), ((NI) (length))); chckNil((void*)Result); switch ((*Result).o) {
|
|
case NIM_FALSE:
|
|
(*Result)._o_1.e = 0; break;
|
|
case NIM_TRUE:
|
|
unsureAsgnRef((void**)&(*Result)._o_2.v, NIM_NIL); break;
|
|
}
|
|
(*Result).o = 0; (*Result).o = NIM_TRUE; genericSeqAssign((&(*Result)._o_2.v), res, (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_)); }
|
|
goto LA9_;
|
|
LA11_: ;
|
|
{ chckNil((void*)Result); switch ((*Result).o) {
|
|
case NIM_FALSE:
|
|
(*Result)._o_1.e = 0; break;
|
|
case NIM_TRUE:
|
|
unsureAsgnRef((void**)&(*Result)._o_2.v, NIM_NIL); break;
|
|
}
|
|
(*Result).o = 0; (*Result).o = NIM_FALSE; (*Result)._o_1.e = ((tyEnum_RsaError__w2cgWwG0mNvGdkcv7fl36g) 1); }
|
|
LA9_: ;
|
|
}BeforeRet_: ;
|
|
}
|
|
N_LIB_PRIVATE N_NIMCALL(void, libp2p_rsaDatInit000)(void) {
|
|
|
|
#line 999999 "generated_not_to_break_here"
|
|
static TNimNode* TM__9b9bhChyVhesk0GF7InzPt4A_2_2[2];
|
|
static TNimNode* TM__9b9bhChyVhesk0GF7InzPt4A_5_5[5];
|
|
static TNimNode TM__9b9bhChyVhesk0GF7InzPt4A_0[9];NTI__cEZIZ6MRRYNM7g7RvdoBpg_.size = sizeof(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg);
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.kind = 18;
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.base = 0;
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.flags = 2;
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.name = "RsaPublicKey:ObjectType";
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.nextType = nimTypeRoot; nimTypeRoot=&NTI__cEZIZ6MRRYNM7g7RvdoBpg_;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_2_2[0] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[1];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[1].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[1].offset = offsetof(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg, buffer);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[1].typ = (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[1].name = "buffer";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_2_2[1] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[2];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[2].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[2].offset = offsetof(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg, key);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[2].typ = (&NTI__a9bHzZTzNRPC7VJ7yppQCuQ_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[2].name = "key";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[0].len = 2; TM__9b9bhChyVhesk0GF7InzPt4A_0[0].kind = 2; TM__9b9bhChyVhesk0GF7InzPt4A_0[0].sons = &TM__9b9bhChyVhesk0GF7InzPt4A_2_2[0];
|
|
NTI__cEZIZ6MRRYNM7g7RvdoBpg_.node = &TM__9b9bhChyVhesk0GF7InzPt4A_0[0];
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.size = sizeof(tyObject_RsaPublicKeycolonObjectType___cEZIZ6MRRYNM7g7RvdoBpg*);
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.kind = 22;
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.base = (&NTI__cEZIZ6MRRYNM7g7RvdoBpg_);
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.flags = 2;
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.name = "RsaPublicKey";
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.nextType = nimTypeRoot; nimTypeRoot=&NTI__2OoLEoAqWG9c1IoFZfCQ23Q_;
|
|
NTI__2OoLEoAqWG9c1IoFZfCQ23Q_.marker = Marker_tyRef__2OoLEoAqWG9c1IoFZfCQ23Q;
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.size = sizeof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw);
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.kind = 18;
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.base = 0;
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.flags = 2;
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.name = "RsaPrivateKey:ObjectType";
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.nextType = nimTypeRoot; nimTypeRoot=&NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_5_5[0] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[4];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[4].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[4].offset = offsetof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw, buffer);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[4].typ = (&NTI__6H5Oh5UUvVCLiakt9aTwtUQ_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[4].name = "buffer";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_5_5[1] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[5];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[5].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[5].offset = offsetof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw, seck);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[5].typ = (&NTI__tnWvqP0WIATHx1gb609c2sg_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[5].name = "seck";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_5_5[2] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[6];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[6].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[6].offset = offsetof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw, pubk);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[6].typ = (&NTI__a9bHzZTzNRPC7VJ7yppQCuQ_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[6].name = "pubk";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_5_5[3] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[7];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[7].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[7].offset = offsetof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw, pexp);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[7].typ = (&NTI__TMujUAuMhbuOEctXLTkMyA_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[7].name = "pexp";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_5_5[4] = &TM__9b9bhChyVhesk0GF7InzPt4A_0[8];
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[8].kind = 1;
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[8].offset = offsetof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw, pexplen);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[8].typ = (&NTI__rR5Bzr1D5krxoo1NcNyeMA_);
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[8].name = "pexplen";
|
|
TM__9b9bhChyVhesk0GF7InzPt4A_0[3].len = 5; TM__9b9bhChyVhesk0GF7InzPt4A_0[3].kind = 2; TM__9b9bhChyVhesk0GF7InzPt4A_0[3].sons = &TM__9b9bhChyVhesk0GF7InzPt4A_5_5[0];
|
|
NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_.node = &TM__9b9bhChyVhesk0GF7InzPt4A_0[3];
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.size = sizeof(tyObject_RsaPrivateKeycolonObjectType___xFWT9bk7KDVd9cMFfRtPM9c9bw*);
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.kind = 22;
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.base = (&NTI__xFWT9bk7KDVd9cMFfRtPM9c9bw_);
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.flags = 2;
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.name = "RsaPrivateKey";
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.nextType = nimTypeRoot; nimTypeRoot=&NTI__YsrjeG6VWJ0XFJD22jLsWA_;
|
|
NTI__YsrjeG6VWJ0XFJD22jLsWA_.marker = Marker_tyRef__YsrjeG6VWJ0XFJD22jLsWA;
|
|
}
|
|
|