Path: blob/main/contrib/bearssl/src/x509/skey_decoder.c
39507 views
/* Automatically generated code; do not modify directly. */12#include <stddef.h>3#include <stdint.h>45typedef struct {6uint32_t *dp;7uint32_t *rp;8const unsigned char *ip;9} t0_context;1011static uint32_t12t0_parse7E_unsigned(const unsigned char **p)13{14uint32_t x;1516x = 0;17for (;;) {18unsigned y;1920y = *(*p) ++;21x = (x << 7) | (uint32_t)(y & 0x7F);22if (y < 0x80) {23return x;24}25}26}2728static int32_t29t0_parse7E_signed(const unsigned char **p)30{31int neg;32uint32_t x;3334neg = ((**p) >> 6) & 1;35x = (uint32_t)-neg;36for (;;) {37unsigned y;3839y = *(*p) ++;40x = (x << 7) | (uint32_t)(y & 0x7F);41if (y < 0x80) {42if (neg) {43return -(int32_t)~x - 1;44} else {45return (int32_t)x;46}47}48}49}5051#define T0_VBYTE(x, n) (unsigned char)((((uint32_t)(x) >> (n)) & 0x7F) | 0x80)52#define T0_FBYTE(x, n) (unsigned char)(((uint32_t)(x) >> (n)) & 0x7F)53#define T0_SBYTE(x) (unsigned char)((((uint32_t)(x) >> 28) + 0xF8) ^ 0xF8)54#define T0_INT1(x) T0_FBYTE(x, 0)55#define T0_INT2(x) T0_VBYTE(x, 7), T0_FBYTE(x, 0)56#define T0_INT3(x) T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0)57#define T0_INT4(x) T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0)58#define T0_INT5(x) T0_SBYTE(x), T0_VBYTE(x, 21), T0_VBYTE(x, 14), T0_VBYTE(x, 7), T0_FBYTE(x, 0)5960/* static const unsigned char t0_datablock[]; */616263void br_skey_decoder_init_main(void *t0ctx);6465void br_skey_decoder_run(void *t0ctx);66676869#include "inner.h"707172737475#include "inner.h"7677#define CTX ((br_skey_decoder_context *)(void *)((unsigned char *)t0ctx - offsetof(br_skey_decoder_context, cpu)))78#define CONTEXT_NAME br_skey_decoder_context7980/* see bearssl_x509.h */81void82br_skey_decoder_init(br_skey_decoder_context *ctx)83{84memset(ctx, 0, sizeof *ctx);85ctx->cpu.dp = &ctx->dp_stack[0];86ctx->cpu.rp = &ctx->rp_stack[0];87br_skey_decoder_init_main(&ctx->cpu);88br_skey_decoder_run(&ctx->cpu);89}9091/* see bearssl_x509.h */92void93br_skey_decoder_push(br_skey_decoder_context *ctx,94const void *data, size_t len)95{96ctx->hbuf = data;97ctx->hlen = len;98br_skey_decoder_run(&ctx->cpu);99}100101102103static const unsigned char t0_datablock[] = {1040x00, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x07,1050x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01, 0x08, 0x2A, 0x86, 0x48, 0xCE,1060x3D, 0x03, 0x01, 0x07, 0x05, 0x2B, 0x81, 0x04, 0x00, 0x22, 0x05, 0x2B,1070x81, 0x04, 0x00, 0x23108};109110static const unsigned char t0_codeblock[] = {1110x00, 0x01, 0x01, 0x07, 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00, 0x13,1120x13, 0x00, 0x00, 0x01, T0_INT1(BR_ERR_X509_BAD_TAG_CLASS), 0x00, 0x00,1130x01, T0_INT1(BR_ERR_X509_BAD_TAG_VALUE), 0x00, 0x00, 0x01,114T0_INT1(BR_ERR_X509_EXTRA_ELEMENT), 0x00, 0x00, 0x01,115T0_INT1(BR_ERR_X509_INDEFINITE_LENGTH), 0x00, 0x00, 0x01,116T0_INT1(BR_ERR_X509_INNER_TRUNC), 0x00, 0x00, 0x01,117T0_INT1(BR_ERR_X509_INVALID_VALUE), 0x00, 0x00, 0x01,118T0_INT1(BR_ERR_X509_LIMIT_EXCEEDED), 0x00, 0x00, 0x01,119T0_INT1(BR_ERR_X509_NOT_CONSTRUCTED), 0x00, 0x00, 0x01,120T0_INT1(BR_ERR_X509_NOT_PRIMITIVE), 0x00, 0x00, 0x01,121T0_INT1(BR_ERR_X509_OVERFLOW), 0x00, 0x00, 0x01,122T0_INT1(BR_ERR_X509_UNEXPECTED), 0x00, 0x00, 0x01,123T0_INT1(BR_ERR_X509_UNSUPPORTED), 0x00, 0x00, 0x01,124T0_INT1(BR_KEYTYPE_EC), 0x00, 0x00, 0x01, T0_INT1(BR_KEYTYPE_RSA),1250x00, 0x00, 0x01, T0_INT2(offsetof(CONTEXT_NAME, key_data)), 0x00,1260x00, 0x01, T0_INT2(offsetof(CONTEXT_NAME, key_type)), 0x00, 0x00,1270x33, 0x48, 0x00, 0x00, 0x01, T0_INT2(offsetof(CONTEXT_NAME, pad)),1280x00, 0x00, 0x01, 0x13, 0x00, 0x00, 0x01, 0x1C, 0x00, 0x00, 0x01, 0x22,1290x00, 0x00, 0x05, 0x02, 0x2C, 0x16, 0x00, 0x00, 0x06, 0x02, 0x2D, 0x16,1300x00, 0x00, 0x01, 0x10, 0x3D, 0x00, 0x00, 0x0D, 0x05, 0x02, 0x2F, 0x16,1310x3A, 0x00, 0x00, 0x0D, 0x05, 0x02, 0x2F, 0x16, 0x3B, 0x00, 0x00, 0x06,1320x02, 0x27, 0x16, 0x00, 0x01, 0x03, 0x00, 0x54, 0x57, 0x01, 0x02, 0x3E,1330x55, 0x23, 0x06, 0x02, 0x30, 0x16, 0x57, 0x01, 0x04, 0x3E, 0x02, 0x00,1340x41, 0x3F, 0x00, 0x02, 0x03, 0x00, 0x53, 0x14, 0x14, 0x03, 0x01, 0x48,1350x0E, 0x06, 0x02, 0x30, 0x16, 0x33, 0x4C, 0x58, 0x01, 0x7F, 0x19, 0x0D,1360x06, 0x04, 0x13, 0x13, 0x04, 0x29, 0x01, 0x20, 0x19, 0x0D, 0x06, 0x16,1370x13, 0x3A, 0x53, 0x4D, 0x02, 0x00, 0x06, 0x09, 0x02, 0x00, 0x0C, 0x06,1380x02, 0x2A, 0x16, 0x04, 0x02, 0x03, 0x00, 0x3F, 0x04, 0x0D, 0x01, 0x21,1390x19, 0x0D, 0x06, 0x04, 0x13, 0x3A, 0x04, 0x03, 0x30, 0x16, 0x13, 0x5D,1400x02, 0x00, 0x05, 0x02, 0x30, 0x16, 0x02, 0x00, 0x02, 0x01, 0x1D, 0x00,1410x02, 0x53, 0x4B, 0x05, 0x02, 0x30, 0x16, 0x5B, 0x15, 0x06, 0x07, 0x5D,1420x01, 0x7F, 0x03, 0x01, 0x04, 0x16, 0x46, 0x15, 0x06, 0x10, 0x01, 0x00,1430x03, 0x01, 0x14, 0x06, 0x03, 0x4D, 0x04, 0x02, 0x01, 0x00, 0x03, 0x00,1440x04, 0x02, 0x30, 0x16, 0x3F, 0x57, 0x01, 0x04, 0x3E, 0x53, 0x02, 0x01,1450x06, 0x03, 0x43, 0x04, 0x03, 0x02, 0x00, 0x40, 0x3F, 0x5D, 0x02, 0x01,1460x06, 0x03, 0x32, 0x04, 0x01, 0x31, 0x00, 0x00, 0x54, 0x57, 0x01, 0x02,1470x3E, 0x55, 0x06, 0x02, 0x30, 0x16, 0x57, 0x01, 0x02, 0x3E, 0x44, 0x3F,1480x00, 0x07, 0x35, 0x50, 0x14, 0x05, 0x02, 0x2F, 0x16, 0x23, 0x01, 0x03,1490x0B, 0x33, 0x17, 0x47, 0x07, 0x03, 0x00, 0x4F, 0x4F, 0x35, 0x4E, 0x14,1500x14, 0x03, 0x01, 0x03, 0x02, 0x51, 0x14, 0x03, 0x03, 0x02, 0x02, 0x07,1510x14, 0x03, 0x02, 0x51, 0x14, 0x03, 0x04, 0x02, 0x02, 0x07, 0x14, 0x03,1520x02, 0x51, 0x14, 0x03, 0x05, 0x02, 0x02, 0x07, 0x14, 0x03, 0x02, 0x51,1530x03, 0x06, 0x02, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x04, 0x02, 0x05,1540x02, 0x06, 0x1E, 0x00, 0x00, 0x19, 0x19, 0x00, 0x00, 0x01, 0x0B, 0x00,1550x00, 0x01, 0x00, 0x20, 0x14, 0x06, 0x08, 0x01, 0x01, 0x21, 0x20, 0x22,1560x20, 0x04, 0x75, 0x13, 0x00, 0x00, 0x01,157T0_INT2(3 * BR_X509_BUFSIZE_SIG), 0x00, 0x01, 0x01, 0x87, 0xFF, 0xFF,1580x7F, 0x54, 0x57, 0x01, 0x02, 0x3E, 0x55, 0x01, 0x01, 0x0E, 0x06, 0x02,1590x30, 0x16, 0x57, 0x01, 0x02, 0x19, 0x0D, 0x06, 0x06, 0x13, 0x3B, 0x44,1600x32, 0x04, 0x1C, 0x01, 0x04, 0x19, 0x0D, 0x06, 0x08, 0x13, 0x3B, 0x01,1610x00, 0x41, 0x31, 0x04, 0x0E, 0x01, 0x10, 0x19, 0x0D, 0x06, 0x05, 0x13,1620x3A, 0x42, 0x04, 0x03, 0x30, 0x16, 0x13, 0x03, 0x00, 0x3F, 0x02, 0x00,1630x34, 0x1F, 0x5A, 0x27, 0x16, 0x00, 0x01, 0x45, 0x0A, 0x06, 0x02, 0x29,1640x16, 0x14, 0x03, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x57, 0x01, 0x06,1650x3E, 0x56, 0x00, 0x00, 0x20, 0x14, 0x06, 0x07, 0x1A, 0x14, 0x06, 0x01,1660x12, 0x04, 0x76, 0x24, 0x00, 0x00, 0x4B, 0x05, 0x02, 0x30, 0x16, 0x37,1670x15, 0x06, 0x04, 0x01, 0x17, 0x04, 0x12, 0x38, 0x15, 0x06, 0x04, 0x01,1680x18, 0x04, 0x0A, 0x39, 0x15, 0x06, 0x04, 0x01, 0x19, 0x04, 0x02, 0x30,1690x16, 0x00, 0x00, 0x1C, 0x57, 0x01, 0x02, 0x3E, 0x09, 0x50, 0x00, 0x00,1700x35, 0x4E, 0x13, 0x00, 0x03, 0x14, 0x03, 0x00, 0x03, 0x01, 0x03, 0x02,1710x53, 0x59, 0x14, 0x01, 0x81, 0x00, 0x0F, 0x06, 0x02, 0x2E, 0x16, 0x14,1720x01, 0x00, 0x0D, 0x06, 0x0B, 0x13, 0x14, 0x05, 0x04, 0x13, 0x01, 0x00,1730x00, 0x59, 0x04, 0x6F, 0x02, 0x01, 0x14, 0x05, 0x02, 0x2B, 0x16, 0x23,1740x03, 0x01, 0x02, 0x02, 0x1F, 0x02, 0x02, 0x22, 0x03, 0x02, 0x14, 0x06,1750x03, 0x59, 0x04, 0x68, 0x13, 0x02, 0x00, 0x02, 0x01, 0x08, 0x00, 0x00,1760x14, 0x35, 0x1C, 0x08, 0x20, 0x1C, 0x07, 0x20, 0x4E, 0x00, 0x01, 0x59,1770x14, 0x01, 0x81, 0x00, 0x0A, 0x06, 0x01, 0x00, 0x01, 0x81, 0x00, 0x08,1780x14, 0x05, 0x02, 0x28, 0x16, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01,1790x00, 0x0E, 0x06, 0x19, 0x02, 0x00, 0x23, 0x03, 0x00, 0x14, 0x01, 0x83,1800xFF, 0xFF, 0x7F, 0x0E, 0x06, 0x02, 0x29, 0x16, 0x01, 0x08, 0x0B, 0x20,1810x59, 0x1C, 0x07, 0x04, 0x60, 0x00, 0x00, 0x52, 0x4A, 0x00, 0x00, 0x57,1820x3C, 0x53, 0x00, 0x01, 0x53, 0x14, 0x05, 0x02, 0x2E, 0x16, 0x59, 0x14,1830x01, 0x81, 0x00, 0x0F, 0x06, 0x02, 0x2E, 0x16, 0x03, 0x00, 0x14, 0x06,1840x16, 0x59, 0x02, 0x00, 0x14, 0x01, 0x87, 0xFF, 0xFF, 0x7F, 0x0F, 0x06,1850x02, 0x2E, 0x16, 0x01, 0x08, 0x0B, 0x07, 0x03, 0x00, 0x04, 0x67, 0x13,1860x02, 0x00, 0x00, 0x00, 0x53, 0x14, 0x01, 0x81, 0x7F, 0x0E, 0x06, 0x08,1870x5C, 0x01, 0x00, 0x36, 0x1F, 0x01, 0x00, 0x00, 0x14, 0x36, 0x1F, 0x36,1880x22, 0x4C, 0x01, 0x7F, 0x00, 0x01, 0x59, 0x03, 0x00, 0x02, 0x00, 0x01,1890x05, 0x10, 0x01, 0x01, 0x11, 0x18, 0x02, 0x00, 0x01, 0x06, 0x10, 0x14,1900x01, 0x01, 0x11, 0x06, 0x02, 0x25, 0x16, 0x01, 0x04, 0x0B, 0x02, 0x00,1910x01, 0x1F, 0x11, 0x14, 0x01, 0x1F, 0x0D, 0x06, 0x02, 0x26, 0x16, 0x07,1920x00, 0x00, 0x14, 0x05, 0x05, 0x01, 0x00, 0x01, 0x7F, 0x00, 0x57, 0x00,1930x00, 0x14, 0x05, 0x02, 0x29, 0x16, 0x23, 0x5A, 0x00, 0x00, 0x1B, 0x14,1940x01, 0x00, 0x0F, 0x06, 0x01, 0x00, 0x13, 0x12, 0x04, 0x74, 0x00, 0x01,1950x01, 0x00, 0x00, 0x5D, 0x13, 0x00, 0x00, 0x14, 0x06, 0x07, 0x5E, 0x14,1960x06, 0x01, 0x12, 0x04, 0x76, 0x00, 0x00, 0x01, 0x00, 0x19, 0x1A, 0x09,1970x24, 0x00198};199200static const uint16_t t0_caddr[] = {2010,2025,20310,20414,20518,20622,20726,20830,20934,21038,21142,21246,21350,21454,21558,21662,21766,21870,21975,22080,22184,22289,22393,22497,225101,226107,227113,228118,229126,230134,231140,232163,233244,234311,235329,236404,237408,238412,239429,240434,241505,242519,243526,244540,245573,246582,247587,248654,249665,250721,251725,252730,253778,254804,255848,256859,257868,258881,259885,260889,261901262};263264#define T0_INTERPRETED 34265266#define T0_ENTER(ip, rp, slot) do { \267const unsigned char *t0_newip; \268uint32_t t0_lnum; \269t0_newip = &t0_codeblock[t0_caddr[(slot) - T0_INTERPRETED]]; \270t0_lnum = t0_parse7E_unsigned(&t0_newip); \271(rp) += t0_lnum; \272*((rp) ++) = (uint32_t)((ip) - &t0_codeblock[0]) + (t0_lnum << 16); \273(ip) = t0_newip; \274} while (0)275276#define T0_DEFENTRY(name, slot) \277void \278name(void *ctx) \279{ \280t0_context *t0ctx = ctx; \281t0ctx->ip = &t0_codeblock[0]; \282T0_ENTER(t0ctx->ip, t0ctx->rp, slot); \283}284285T0_DEFENTRY(br_skey_decoder_init_main, 73)286287#define T0_NEXT(t0ipp) (*(*(t0ipp)) ++)288289void290br_skey_decoder_run(void *t0ctx)291{292uint32_t *dp, *rp;293const unsigned char *ip;294295#define T0_LOCAL(x) (*(rp - 2 - (x)))296#define T0_POP() (*-- dp)297#define T0_POPi() (*(int32_t *)(-- dp))298#define T0_PEEK(x) (*(dp - 1 - (x)))299#define T0_PEEKi(x) (*(int32_t *)(dp - 1 - (x)))300#define T0_PUSH(v) do { *dp = (v); dp ++; } while (0)301#define T0_PUSHi(v) do { *(int32_t *)dp = (v); dp ++; } while (0)302#define T0_RPOP() (*-- rp)303#define T0_RPOPi() (*(int32_t *)(-- rp))304#define T0_RPUSH(v) do { *rp = (v); rp ++; } while (0)305#define T0_RPUSHi(v) do { *(int32_t *)rp = (v); rp ++; } while (0)306#define T0_ROLL(x) do { \307size_t t0len = (size_t)(x); \308uint32_t t0tmp = *(dp - 1 - t0len); \309memmove(dp - t0len - 1, dp - t0len, t0len * sizeof *dp); \310*(dp - 1) = t0tmp; \311} while (0)312#define T0_SWAP() do { \313uint32_t t0tmp = *(dp - 2); \314*(dp - 2) = *(dp - 1); \315*(dp - 1) = t0tmp; \316} while (0)317#define T0_ROT() do { \318uint32_t t0tmp = *(dp - 3); \319*(dp - 3) = *(dp - 2); \320*(dp - 2) = *(dp - 1); \321*(dp - 1) = t0tmp; \322} while (0)323#define T0_NROT() do { \324uint32_t t0tmp = *(dp - 1); \325*(dp - 1) = *(dp - 2); \326*(dp - 2) = *(dp - 3); \327*(dp - 3) = t0tmp; \328} while (0)329#define T0_PICK(x) do { \330uint32_t t0depth = (x); \331T0_PUSH(T0_PEEK(t0depth)); \332} while (0)333#define T0_CO() do { \334goto t0_exit; \335} while (0)336#define T0_RET() goto t0_next337338dp = ((t0_context *)t0ctx)->dp;339rp = ((t0_context *)t0ctx)->rp;340ip = ((t0_context *)t0ctx)->ip;341goto t0_next;342for (;;) {343uint32_t t0x;344345t0_next:346t0x = T0_NEXT(&ip);347if (t0x < T0_INTERPRETED) {348switch (t0x) {349int32_t t0off;350351case 0: /* ret */352t0x = T0_RPOP();353rp -= (t0x >> 16);354t0x &= 0xFFFF;355if (t0x == 0) {356ip = NULL;357goto t0_exit;358}359ip = &t0_codeblock[t0x];360break;361case 1: /* literal constant */362T0_PUSHi(t0_parse7E_signed(&ip));363break;364case 2: /* read local */365T0_PUSH(T0_LOCAL(t0_parse7E_unsigned(&ip)));366break;367case 3: /* write local */368T0_LOCAL(t0_parse7E_unsigned(&ip)) = T0_POP();369break;370case 4: /* jump */371t0off = t0_parse7E_signed(&ip);372ip += t0off;373break;374case 5: /* jump if */375t0off = t0_parse7E_signed(&ip);376if (T0_POP()) {377ip += t0off;378}379break;380case 6: /* jump if not */381t0off = t0_parse7E_signed(&ip);382if (!T0_POP()) {383ip += t0off;384}385break;386case 7: {387/* + */388389uint32_t b = T0_POP();390uint32_t a = T0_POP();391T0_PUSH(a + b);392393}394break;395case 8: {396/* - */397398uint32_t b = T0_POP();399uint32_t a = T0_POP();400T0_PUSH(a - b);401402}403break;404case 9: {405/* -rot */406T0_NROT();407}408break;409case 10: {410/* < */411412int32_t b = T0_POPi();413int32_t a = T0_POPi();414T0_PUSH(-(uint32_t)(a < b));415416}417break;418case 11: {419/* << */420421int c = (int)T0_POPi();422uint32_t x = T0_POP();423T0_PUSH(x << c);424425}426break;427case 12: {428/* <> */429430uint32_t b = T0_POP();431uint32_t a = T0_POP();432T0_PUSH(-(uint32_t)(a != b));433434}435break;436case 13: {437/* = */438439uint32_t b = T0_POP();440uint32_t a = T0_POP();441T0_PUSH(-(uint32_t)(a == b));442443}444break;445case 14: {446/* > */447448int32_t b = T0_POPi();449int32_t a = T0_POPi();450T0_PUSH(-(uint32_t)(a > b));451452}453break;454case 15: {455/* >= */456457int32_t b = T0_POPi();458int32_t a = T0_POPi();459T0_PUSH(-(uint32_t)(a >= b));460461}462break;463case 16: {464/* >> */465466int c = (int)T0_POPi();467int32_t x = T0_POPi();468T0_PUSHi(x >> c);469470}471break;472case 17: {473/* and */474475uint32_t b = T0_POP();476uint32_t a = T0_POP();477T0_PUSH(a & b);478479}480break;481case 18: {482/* co */483T0_CO();484}485break;486case 19: {487/* drop */488(void)T0_POP();489}490break;491case 20: {492/* dup */493T0_PUSH(T0_PEEK(0));494}495break;496case 21: {497/* eqOID */498499const unsigned char *a2 = &t0_datablock[T0_POP()];500const unsigned char *a1 = &CTX->pad[0];501size_t len = a1[0];502int x;503if (len == a2[0]) {504x = -(memcmp(a1 + 1, a2 + 1, len) == 0);505} else {506x = 0;507}508T0_PUSH((uint32_t)x);509510}511break;512case 22: {513/* fail */514515CTX->err = T0_POPi();516T0_CO();517518}519break;520case 23: {521/* get8 */522523uint32_t addr = T0_POP();524T0_PUSH(*((unsigned char *)CTX + addr));525526}527break;528case 24: {529/* neg */530531uint32_t a = T0_POP();532T0_PUSH(-a);533534}535break;536case 25: {537/* over */538T0_PUSH(T0_PEEK(1));539}540break;541case 26: {542/* read-blob-inner */543544uint32_t len = T0_POP();545uint32_t addr = T0_POP();546size_t clen = CTX->hlen;547if (clen > len) {548clen = (size_t)len;549}550if (addr != 0) {551memcpy((unsigned char *)CTX + addr, CTX->hbuf, clen);552}553CTX->hbuf += clen;554CTX->hlen -= clen;555T0_PUSH(addr + clen);556T0_PUSH(len - clen);557558}559break;560case 27: {561/* read8-low */562563if (CTX->hlen == 0) {564T0_PUSHi(-1);565} else {566CTX->hlen --;567T0_PUSH(*CTX->hbuf ++);568}569570}571break;572case 28: {573/* rot */574T0_ROT();575}576break;577case 29: {578/* set-ec-key */579580size_t xlen = T0_POP();581uint32_t curve = T0_POP();582CTX->key.ec.curve = curve;583CTX->key.ec.x = CTX->key_data;584CTX->key.ec.xlen = xlen;585586}587break;588case 30: {589/* set-rsa-key */590591size_t iqlen = T0_POP();592size_t dqlen = T0_POP();593size_t dplen = T0_POP();594size_t qlen = T0_POP();595size_t plen = T0_POP();596uint32_t n_bitlen = T0_POP();597size_t off;598599CTX->key.rsa.n_bitlen = n_bitlen;600CTX->key.rsa.p = CTX->key_data;601CTX->key.rsa.plen = plen;602off = plen;603CTX->key.rsa.q = CTX->key_data + off;604CTX->key.rsa.qlen = qlen;605off += qlen;606CTX->key.rsa.dp = CTX->key_data + off;607CTX->key.rsa.dplen = dplen;608off += dplen;609CTX->key.rsa.dq = CTX->key_data + off;610CTX->key.rsa.dqlen = dqlen;611off += dqlen;612CTX->key.rsa.iq = CTX->key_data + off;613CTX->key.rsa.iqlen = iqlen;614615}616break;617case 31: {618/* set8 */619620uint32_t addr = T0_POP();621*((unsigned char *)CTX + addr) = (unsigned char)T0_POP();622623}624break;625case 32: {626/* swap */627T0_SWAP();628}629break;630case 33: {631/* u>> */632633int c = (int)T0_POPi();634uint32_t x = T0_POP();635T0_PUSH(x >> c);636637}638break;639}640641} else {642T0_ENTER(ip, rp, t0x);643}644}645t0_exit:646((t0_context *)t0ctx)->dp = dp;647((t0_context *)t0ctx)->rp = rp;648((t0_context *)t0ctx)->ip = ip;649}650651652