SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
SharkSslASN1.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * SharkSSL Embedded SSL/TLS Stack
10 ****************************************************************************
11 * PROGRAM MODULE
12 *
13 * $Id: SharkSslASN1.h 6825 2026-11-10 21:17:44Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2018 - 2026
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://www.realtimelogic.com
33 * http://www.sharkssl.com
34 ****************************************************************************
35 *
36 */
37#ifndef _SharkSslASN1_h
38#define _SharkSslASN1_h
39
45#include "SharkSslEx.h"
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
57#define SHARKSSL_ASN1_BOOLEAN 0x01
58#define SHARKSSL_ASN1_INTEGER 0x02
59#define SHARKSSL_ASN1_BIT_STRING 0x03
60#define SHARKSSL_ASN1_OCTET_STRING 0x04
61#define SHARKSSL_ASN1_NULL 0x05
62#define SHARKSSL_ASN1_OID 0x06
63#define SHARKSSL_ASN1_UTF8_STRING 0x0C
64#define SHARKSSL_ASN1_SEQUENCE 0x10
65#define SHARKSSL_ASN1_SET 0x11
66#define SHARKSSL_ASN1_PRINTABLE_STRING 0x13
67#define SHARKSSL_ASN1_T61_STRING 0x14
68#define SHARKSSL_ASN1_IA5_STRING 0x16
69#define SHARKSSL_ASN1_UTC_TIME 0x17
70#define SHARKSSL_ASN1_GENERALIZED_TIME 0x18
71#define SHARKSSL_ASN1_BMP_STRING 0x1E
72#define SHARKSSL_ASN1_CONSTRUCTED 0x20
73#define SHARKSSL_ASN1_CONTEXT_SPECIFIC 0x80
74#define SHARKSSL_ASN1_ALGO_ID_ED25519 0x90
75#define SHARKSSL_ASN1_ALGO_ID_ED448 0xA0
76#define SHARKSSL_ASN1_MIN_INTEGER_TLV_LEN 3
77
81#define SHARKSSL_OID_JIIT_DS 0x55
82#define SHARKSSL_OID_JIIT_DS_ATTRTYPE 0x04
83#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_CN 0x03
84#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_SERIAL 0x05
85#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_COUNTRY 0x06
86#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_LOCALITY 0x07
87#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_PROVINCE 0x08
88#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_ORGANIZATION 0x0A
89#define SHARKSSL_OID_JIIT_DS_ATTRTYPE_UNIT 0x0B
93#define SHARKSSL_OID_JIIT_DS_CERTEXT 0x1D
94#define SHARKSSL_OID_JIIT_DS_CERTEXT_KEYUSAGE 0x0F
95#define SHARKSSL_OID_JIIT_DS_CERTEXT_SUBJALTNAMES 0x11
96#define SHARKSSL_OID_JIIT_DS_CERTEXT_BASICCONSTRAINTS 0x13
97#define SHARKSSL_OID_JIIT_DS_CERTEXT_NAMECONSTRAINTS 0x1E
98#define SHARKSSL_OID_JIIT_DS_CERTEXT_EXTKEYUSAGE 0x25
99
105#define SHARKSSL_CSR_TAG_ATTRIBUTES 0x00
106
110#define SHARKSSL_ASN1_PSS_TAG_HASH_ALGORITHM 0x00
111#define SHARKSSL_ASN1_PSS_TAG_MASK_GEN_ALGORITHM 0x01
112#define SHARKSSL_ASN1_PSS_TAG_SALT_LENGTH 0x02
113
119#define SHARKSSL_X509_TAG_VERSION 0x00
120#define SHARKSSL_X509_TAG_ISSUERUNIQUEID 0x01
121#define SHARKSSL_X509_TAG_SUBJECTUNIQUEID 0x02
122#define SHARKSSL_X509_TAG_EXTENSIONS 0x03
123
128#define SHARKSSL_ECC_PRIVKEY_TAG_PARAMETERS 0x00
129#define SHARKSSL_ECC_PRIVKEY_TAG_PUBLIC_KEY 0x01
130
134#define SHARKSSL_X509_KU_DIGITAL_SIGNATURE 0x80
135#define SHARKSSL_X509_KU_NON_REPUDIATION 0x40
136#define SHARKSSL_X509_KU_KEY_ENCIPHERMENT 0x20
137#define SHARKSSL_X509_KU_DATA_ENCIPHERMENT 0x10
138#define SHARKSSL_X509_KU_KEY_AGREEMENT 0x08
139#define SHARKSSL_X509_KU_KEY_CERT_SIGN 0x04
140#define SHARKSSL_X509_KU_CRL_SIGN 0x02
141
148#define SHARKSSL_X509_NS_CERT_TYPE_SSL_CLIENT 0x80
149#define SHARKSSL_X509_NS_CERT_TYPE_SSL_SERVER 0x40
150#define SHARKSSL_X509_NS_CERT_TYPE_OBJECT_SIGNING 0x10
151#define SHARKSSL_X509_NS_CERT_TYPE_SSL_CA 0x04
152#define SHARKSSL_X509_NS_CERT_TYPE_OBJECT_SIGNING_CA 0x01
153
154
157
158
159/* OID's - length has to match the content in SharkSslASN1.c */
160extern const U8 sharkssl_oid_CN[3];
161extern const U8 sharkssl_oid_serial[3];
162extern const U8 sharkssl_oid_country[3];
163extern const U8 sharkssl_oid_locality[3];
164extern const U8 sharkssl_oid_province[3];
165extern const U8 sharkssl_oid_organization[3];
166extern const U8 sharkssl_oid_unit[3];
167extern const U8 sharkssl_oid_emailAddress[9];
168extern const U8 sharkssl_oid_csr_ext_req[9];
169extern const U8 sharkssl_oid_signedData[9];
170extern const U8 sharkssl_oid_ns_cert_type[9];
171extern const U8 sharkssl_oid_key_usage[3];
172extern const U8 sharkssl_oid_san[3];
173extern const U8 sharkssl_oid_basic_constraints[3];
174extern const U8 sharkssl_oid_ecPublicKey[7];
175extern const U8 sharkssl_oid_prime192v1[8];
176extern const U8 sharkssl_oid_prime256v1[8];
177extern const U8 sharkssl_oid_ecdsaWithSHA1[7];
178extern const U8 sharkssl_oid_ecdsaWithSHA256[8];
179extern const U8 sharkssl_oid_ecdsaWithSHA384[8];
180extern const U8 sharkssl_oid_ecdsaWithSHA512[8];
181extern const U8 sharkssl_oid_secp224r1[5];
182extern const U8 sharkssl_oid_secp384r1[5];
183extern const U8 sharkssl_oid_secp521r1[5];
184extern const U8 sharkssl_oid_brainpoolP256r1[9];
185extern const U8 sharkssl_oid_brainpoolP384r1[9];
186extern const U8 sharkssl_oid_brainpoolP512r1[9];
187extern const U8 sharkssl_oid_curve25519[9];
188extern const U8 sharkssl_oid_rsaEncryption[9];
189extern const U8 sharkssl_oid_md2withRSAEncryption[9];
190extern const U8 sharkssl_oid_md5withRSAEncryption[9];
191extern const U8 sharkssl_oid_sha1withRSAEncryption[9];
192extern const U8 sharkssl_oid_sha256withRSAEncryption[9];
193extern const U8 sharkssl_oid_sha384withRSAEncryption[9];
194extern const U8 sharkssl_oid_sha512withRSAEncryption[9];
195extern const U8 sharkssl_oid_md5[8];
196extern const U8 sharkssl_oid_sha1[5];
197extern const U8 sharkssl_oid_sha256[9];
198extern const U8 sharkssl_oid_sha384[9];
199extern const U8 sharkssl_oid_sha512[9];
200extern const U8 sharkssl_oid_pkcs5PBES2[9];
201extern const U8 sharkssl_oid_pkcs5PBKDF2[9];
202extern const U8 sharkssl_oid_HMACWithSHA256[8];
203#if SHARKSSL_ENABLE_AES_CBC
204extern const U8 sharkssl_oid_aes128cbc[9];
205extern const U8 sharkssl_oid_aes256cbc[9];
206#endif
207#if (SHARKSSL_ENABLE_RSA && SHARKSSL_ENABLE_RSASSA_PSS)
208extern const U8 sharkssl_oid_rsassaPss[9];
209extern const U8 sharkssl_oid_mgf1[9];
210#endif
211#if SHARKSSL_ENABLE_EDDSA
212extern const U8 sharkssl_oid_ed25519[3];
213extern const U8 sharkssl_oid_ed448[3];
214#endif
215
216
217#define sharkssl_oid_ex(type) (const U8*)sharkssl_oid_ ## type, (sizeof(sharkssl_oid_ ## type)/sizeof(sharkssl_oid_ ## type[0]))
218
219
220
221/* never call these functions directly but only through the macros below */
223SHARKSSL_API int SharkSslParseASN1_getType(SharkSslParseASN1 *o, U8 ASN1type); /* dataptr, datalen are valid */
224SHARKSSL_API int SharkSslParseASN1_getSetSeq(SharkSslParseASN1 *o, U8 ASN1id);
225
226#define SharkSslParseASN1_getBool(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_BOOLEAN)
227#define SharkSslParseASN1_getInt(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_INTEGER)
228#define SharkSslParseASN1_getBitString(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_BIT_STRING)
229#define SharkSslParseASN1_getOctetString(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_OCTET_STRING)
230#define SharkSslParseASN1_getNULL(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_NULL)
231#define SharkSslParseASN1_getOID(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_OID)
232#define SharkSslParseASN1_getUTCTime(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_UTC_TIME)
233#define SharkSslParseASN1_getGenTime(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_GENERALIZED_TIME)
234#define SharkSslParseASN1_getIssuerUniqueID(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_ISSUERUNIQUEID)
235#define SharkSslParseASN1_getSubjectUniqueID(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_SUBJECTUNIQUEID)
236#define SharkSslParseASN1_getExtensions(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_EXTENSIONS)
237#define SharkSslParseASN1_getCSRAttributes(o) SharkSslParseASN1_getType(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_CSR_TAG_ATTRIBUTES)
238
239#define SharkSslParseASN1_getECParameters(o) SharkSslParseASN1_getSetSeq(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ECC_PRIVKEY_TAG_PARAMETERS)
240#define SharkSslParseASN1_getECPublicKey(o) SharkSslParseASN1_getSetSeq(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ECC_PRIVKEY_TAG_PUBLIC_KEY)
241#define SharkSslParseASN1_getVersion(o) SharkSslParseASN1_getSetSeq(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_VERSION)
242#define SharkSslParseASN1_getSet(o) SharkSslParseASN1_getSetSeq(o, SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ASN1_SET)
243#define SharkSslParseASN1_getSequence(o) SharkSslParseASN1_getSetSeq(o, SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ASN1_SEQUENCE)
244
247
248
254typedef struct SharkSslASN1Create
255{
256 U8 *start;
257 U8 *end;
258 U8 *ptr;
260
267typedef struct SharkSslBitExtReq
268{
271
272
273#define SharkSslASN1Create_getLen(o) ((int)((o)->end - (o)->ptr))
274#define SharkSslASN1Create_getData(o) ((o)->ptr)
275
281#define SharkSslASN1Create_getDataLen(o, startOfDataPtr) (*(startOfDataPtr) = (o)->ptr, (int)((o)->end - (o)->ptr))
282
283SHARKSSL_API void SharkSslASN1Create_constructor(SharkSslASN1Create *o, U8 *buf, int bufSize);
284SHARKSSL_API int SharkSslASN1Create_int(SharkSslASN1Create *o, const U8 *intptr, int len);
285
286SHARKSSL_API int SharkSslASN1Create_length(SharkSslASN1Create *o, int len);
287SHARKSSL_API int SharkSslASN1Create_tag(SharkSslASN1Create *o, U8 ASN1type);
288
289#define SharkSslASN1Create_bitString(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_BIT_STRING)
290#define SharkSslASN1Create_octetString(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_OCTET_STRING)
291#define SharkSslASN1Create_printableString(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_PRINTABLE_STRING)
292#define SharkSslASN1Create_IA5String(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_IA5_STRING)
293#define SharkSslASN1Create_extensions(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_EXTENSIONS)
294#define SharkSslASN1Create_version(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_X509_TAG_VERSION)
295#define SharkSslASN1Create_CSRAttributes(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_CSR_TAG_ATTRIBUTES)
296#define SharkSslASN1Create_ECParameters(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ECC_PRIVKEY_TAG_PARAMETERS)
297#define SharkSslASN1Create_ECPublicKey(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONTEXT_SPECIFIC | SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ECC_PRIVKEY_TAG_PUBLIC_KEY)
298
299#define SharkSslASN1Create_set(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ASN1_SET)
300#define SharkSslASN1Create_sequence(o) SharkSslASN1Create_tag(o, SHARKSSL_ASN1_CONSTRUCTED | SHARKSSL_ASN1_SEQUENCE)
301
302#if (SHARKSSL_ENABLE_CSR_CREATION || SHARKSSL_ENABLE_CSR_SIGNING || SHARKSSL_ENABLE_ASN1_KEY_CREATION)
303SHARKSSL_API int SharkSslASN1Create_oid(SharkSslASN1Create *o, const U8 *oid, int oidLen);
304SHARKSSL_API int SharkSslASN1Create_raw(SharkSslASN1Create *o, const void *data, int size);
305#endif
306#if (SHARKSSL_ENABLE_CSR_CREATION || SHARKSSL_ENABLE_CSR_SIGNING)
307SHARKSSL_API int SharkSslASN1Create_email(SharkSslASN1Create *o, const U8 *oid, int oidLen, const U8 *email, int emailLen);
308SHARKSSL_API int SharkSslASN1Create_name(SharkSslASN1Create *o, const U8 *oid, int oidLen, const U8 *name, int nameLen);
309#endif
310#if (SHARKSSL_ENABLE_CSR_SIGNING)
311SHARKSSL_API int SharkSslASN1Create_boolean(SharkSslASN1Create *o, U8 boolean);
312#endif
313
314
315/* Semi public (non documented) types and functions */
316SHARKSSL_API int sharkssl_PEM_getSeqVersion(SharkSslParseASN1 *parseKey, U32 len);
319
320/* heterogeneous usage of _getAlgoID to detect ecPublicKey OID in EC
321 * public certs
322*/
323#define ALGO_OID_EC_PUBLIC_KEY SHARKSSL_OID_EC_PUBLIC_KEY
324
325#define SHARKSSL_EC_CURVE_ID_UNKNOWN 0
326#define SHARKSSL_EC_POINT_UNCOMPRESSED 0x04
327
328
329#ifdef __cplusplus
330}
331#endif
332
333#endif
const U8 sharkssl_oid_brainpoolP512r1[9]
const U8 sharkssl_oid_ecdsaWithSHA512[8]
const U8 sharkssl_oid_sha384[9]
const U8 sharkssl_oid_mgf1[9]
const U8 sharkssl_oid_serial[3]
const U8 sharkssl_oid_ecdsaWithSHA384[8]
const U8 sharkssl_oid_ecdsaWithSHA256[8]
const U8 sharkssl_oid_md2withRSAEncryption[9]
const U8 sharkssl_oid_csr_ext_req[9]
const U8 sharkssl_oid_organization[3]
const U8 sharkssl_oid_country[3]
const U8 sharkssl_oid_prime192v1[8]
const U8 sharkssl_oid_province[3]
const U8 sharkssl_oid_sha384withRSAEncryption[9]
const U8 sharkssl_oid_rsassaPss[9]
const U8 sharkssl_oid_san[3]
SharkSslParseASN1 SharkSslASN1
Definition: SharkSslASN1.h:156
const U8 sharkssl_oid_ed25519[3]
struct SharkSslBitExtReq SharkSslBitExtReq
Requested one-byte extension bit mask for CSR creation.
const U8 sharkssl_oid_ed448[3]
const U8 sharkssl_oid_CN[3]
const U8 sharkssl_oid_aes128cbc[9]
const U8 sharkssl_oid_pkcs5PBES2[9]
const U8 sharkssl_oid_ecPublicKey[7]
const U8 sharkssl_oid_emailAddress[9]
const U8 sharkssl_oid_sha256withRSAEncryption[9]
const U8 sharkssl_oid_prime256v1[8]
const U8 sharkssl_oid_signedData[9]
const U8 sharkssl_oid_secp521r1[5]
struct SharkSslASN1Create SharkSslASN1Create
Opaque object used when creating ASN.1 encoded data.
const U8 sharkssl_oid_secp384r1[5]
const U8 sharkssl_oid_sha512[9]
const U8 sharkssl_oid_rsaEncryption[9]
const U8 sharkssl_oid_sha1[5]
const U8 sharkssl_oid_curve25519[9]
const U8 sharkssl_oid_sha256[9]
const U8 sharkssl_oid_aes256cbc[9]
const U8 sharkssl_oid_md5[8]
const U8 sharkssl_oid_brainpoolP384r1[9]
const U8 sharkssl_oid_secp224r1[5]
const U8 sharkssl_oid_pkcs5PBKDF2[9]
const U8 sharkssl_oid_locality[3]
const U8 sharkssl_oid_basic_constraints[3]
const U8 sharkssl_oid_sha512withRSAEncryption[9]
const U8 sharkssl_oid_brainpoolP256r1[9]
const U8 sharkssl_oid_HMACWithSHA256[8]
const U8 sharkssl_oid_ecdsaWithSHA1[7]
const U8 sharkssl_oid_key_usage[3]
const U8 sharkssl_oid_ns_cert_type[9]
const U8 sharkssl_oid_sha1withRSAEncryption[9]
const U8 sharkssl_oid_md5withRSAEncryption[9]
const U8 sharkssl_oid_unit[3]
SHARKSSL_API U8 SharkSslParseASN1_getCurveID(const SharkSslParseASN1 *o)
Map an already parsed OID to a SharkSSL curve identifier.
SHARKSSL_API int SharkSslASN1Create_email(SharkSslASN1Create *o, const U8 *oid, int oidLen, const U8 *email, int emailLen)
Prepend a distinguished-name attribute using IA5String.
SHARKSSL_API int SharkSslASN1Create_tag(SharkSslASN1Create *o, U8 ASN1type)
Prepend a one-byte ASN.1 tag.
SHARKSSL_API int SharkSslParseASN1_getSetSeq(SharkSslParseASN1 *o, U8 ASN1id)
Consume an expected tag and its length, leaving the cursor at its content.
int SharkSslParseASN1_getContextSpecific(SharkSslParseASN1 *o, U8 *tag)
Read a context-specific value and advance past it.
SHARKSSL_API int SharkSslASN1Create_int(SharkSslASN1Create *o, const U8 *intptr, int len)
Prepend a nonnegative ASN.1 INTEGER.
SHARKSSL_API int sharkssl_PEM_getSeqVersion(SharkSslParseASN1 *parseKey, U32 len)
Enter an ASN.1 key sequence and read its one-byte version.
SHARKSSL_API int SharkSslASN1Create_length(SharkSslASN1Create *o, int len)
Prepend a definite ASN.1 length.
SHARKSSL_API U8 SharkSslParseASN1_getAlgoID(const SharkSslParseASN1 *o)
Map an already parsed OID to a SharkSSL algorithm identifier.
SHARKSSL_API int SharkSslASN1Create_raw(SharkSslASN1Create *o, const void *data, int size)
Prepend raw bytes without a tag or length.
SHARKSSL_API int SharkSslParseASN1_getType(SharkSslParseASN1 *o, U8 ASN1type)
Read one tagged value and expose its borrowed content in dataptr/datalen.
SHARKSSL_API int SharkSslASN1Create_oid(SharkSslASN1Create *o, const U8 *oid, int oidLen)
Prepend an ASN.1 OBJECT IDENTIFIER.
int SharkSslParseASN1_getLength(SharkSslParseASN1 *o)
Read an ASN.1 length and advance past its encoding.
int SharkSslParseASN1_parseCertSignatureAlgorithm(SharkSslParseASN1 *o)
Consume a certificate signature AlgorithmIdentifier.
SHARKSSL_API int SharkSslASN1Create_name(SharkSslASN1Create *o, const U8 *oid, int oidLen, const U8 *name, int nameLen)
Prepend a distinguished-name attribute using PrintableString.
SHARKSSL_API void SharkSslASN1Create_constructor(SharkSslASN1Create *o, U8 *buf, int bufSize)
Initialize an encoder that writes backward from the end of a buffer.
SHARKSSL_API int SharkSslASN1Create_boolean(SharkSslASN1Create *o, U8 boolean)
Prepend an ASN.1 BOOLEAN.
Opaque object used when creating ASN.1 encoded data.
Definition: SharkSslASN1.h:255
U8 * end
Definition: SharkSslASN1.h:257
U8 * ptr
Definition: SharkSslASN1.h:258
U8 * start
Definition: SharkSslASN1.h:256
Requested one-byte extension bit mask for CSR creation.
Definition: SharkSslASN1.h:268
U8 bits
Definition: SharkSslASN1.h:269
SubjectAltName Iterator.
Definition: SharkSslEx.h:56