Skip to content

Commit 7a2aabf

Browse files
buggywhipsjaeckel
authored andcommitted
update crypt_constants.c
1 parent 9f02fde commit 7a2aabf

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

src/misc/crypt/crypt_constants.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ typedef struct {
2626
#define _C_STRINGIFY(s) { #s, s }
2727

2828
static const crypt_constant _crypt_constants[] = {
29+
2930
_C_STRINGIFY(PK_PUBLIC),
3031
_C_STRINGIFY(PK_PRIVATE),
3132

33+
{"LTC_ENCRYPT", 0}, /* good for all other xxx_ENCRYPT prefixes */
34+
{"LTC_DECRYPT", 1}, /* good for all other xxx_DECRYPT prefixes */
35+
3236
_C_STRINGIFY(PKA_RSA),
3337
_C_STRINGIFY(PKA_DSA),
3438

@@ -42,6 +46,7 @@ static const crypt_constant _crypt_constants[] = {
4246
_C_STRINGIFY(LTC_PKCS_1_V1_5),
4347
_C_STRINGIFY(LTC_PKCS_1_OAEP),
4448
_C_STRINGIFY(LTC_PKCS_1_PSS),
49+
_C_STRINGIFY(LTC_PKCS_1_V1_5_NA1),
4550
#else
4651
{"LTC_PKCS_1", 0},
4752
#endif
@@ -85,6 +90,31 @@ static const crypt_constant _crypt_constants[] = {
8590
_C_STRINGIFY(LTC_MILLER_RABIN_REPS),
8691
#endif
8792

93+
#ifdef LTC_DER
94+
/* DER handling */
95+
_C_STRINGIFY(LTC_ASN1_EOL),
96+
_C_STRINGIFY(LTC_ASN1_BOOLEAN),
97+
_C_STRINGIFY(LTC_ASN1_INTEGER),
98+
_C_STRINGIFY(LTC_ASN1_SHORT_INTEGER),
99+
_C_STRINGIFY(LTC_ASN1_BIT_STRING),
100+
_C_STRINGIFY(LTC_ASN1_OCTET_STRING),
101+
_C_STRINGIFY(LTC_ASN1_NULL),
102+
_C_STRINGIFY(LTC_ASN1_OBJECT_IDENTIFIER),
103+
_C_STRINGIFY(LTC_ASN1_IA5_STRING),
104+
_C_STRINGIFY(LTC_ASN1_PRINTABLE_STRING),
105+
_C_STRINGIFY(LTC_ASN1_UTF8_STRING),
106+
_C_STRINGIFY(LTC_ASN1_UTCTIME),
107+
_C_STRINGIFY(LTC_ASN1_CHOICE),
108+
_C_STRINGIFY(LTC_ASN1_SEQUENCE),
109+
_C_STRINGIFY(LTC_ASN1_SET),
110+
_C_STRINGIFY(LTC_ASN1_SETOF),
111+
_C_STRINGIFY(LTC_ASN1_RAW_BIT_STRING),
112+
_C_STRINGIFY(LTC_ASN1_TELETEX_STRING),
113+
_C_STRINGIFY(LTC_ASN1_CONSTRUCTED),
114+
_C_STRINGIFY(LTC_ASN1_CONTEXT_SPECIFIC),
115+
_C_STRINGIFY(LTC_ASN1_GENERALIZEDTIME),
116+
#endif
117+
88118
#ifdef LTC_CTR_MODE
89119
{"LTC_CTR_MODE", 1},
90120
_C_STRINGIFY(CTR_COUNTER_LITTLE_ENDIAN),
@@ -93,6 +123,14 @@ static const crypt_constant _crypt_constants[] = {
93123
#else
94124
{"LTC_CTR_MODE", 0},
95125
#endif
126+
#ifdef LTC_GCM_MODE
127+
_C_STRINGIFY(LTC_GCM_MODE_IV),
128+
_C_STRINGIFY(LTC_GCM_MODE_AAD),
129+
_C_STRINGIFY(LTC_GCM_MODE_TEXT),
130+
#endif
131+
132+
_C_STRINGIFY(LTC_MP_NO),
133+
_C_STRINGIFY(LTC_MP_YES),
96134

97135
_C_STRINGIFY(MAXBLOCKSIZE),
98136
_C_STRINGIFY(TAB_SIZE),

0 commit comments

Comments
 (0)