ASN1C C/C++ Common Runtime  ASN1C v7.7.x
asn1type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2023 Objective Systems, Inc.
3  *
4  * This software is furnished under a license and may be used and copied
5  * only in accordance with the terms of such license and with the
6  * inclusion of the above copyright notice. This software or any other
7  * copies thereof may not be provided or otherwise made available to any
8  * other person. No title to and ownership of the software is hereby
9  * transferred.
10  *
11  * The information in this software is subject to change without notice
12  * and should not be construed as a commitment by Objective Systems, Inc.
13  *
14  * PROPRIETARY NOTICE
15  *
16  * This software is an unpublished work subject to a confidentiality agreement
17  * and is protected by copyright and trade secret law. Unauthorized copying,
18  * redistribution or other use of this work is prohibited.
19  *
20  * The above notice of copyright on this source code product does not indicate
21  * any actual or intended publication of such source code.
22  *
23  *****************************************************************************/
24  /*The following is the text for the main C/C++ Runtime index page.*/
100 #ifndef _ASN1TYPE_H_
101 #define _ASN1TYPE_H_
102 
103 #include <limits.h>
104 #include <stdio.h>
105 #include <string.h>
106 #include <stddef.h>
107 #include <setjmp.h>
108 #include <stdlib.h> /*so that borland compilers don't choke on extern linkage*/
109 #ifndef _WIN32_WCE
110 #include <time.h>
111 #endif
112 
113 #ifdef _NUCLEUS
114 #ifndef NUCLEUS
115 #include <nucleus.h>
116 #endif /* NUCLEUS */
117 #else
118 
119 #if !defined(_MSC_VER) && !defined(__GNUC__) && !defined(_16BIT) && !defined(__SYMBIAN32__)
120 #include <wchar.h>
121 #endif
122 
123 #endif /* _NUCLEUS */
124 
125 #include "rtxsrc/rtxExternDefs.h"
126 #include "rtxsrc/rtxSList.h"
127 #include "rtxsrc/rtxStack.h"
128 #include "rtxsrc/rtxUTF8.h"
129 
130 
169 #include "rtsrc/asn1tag.h"
170 #include "rtsrc/asn1ErrCodes.h"
171 #include "rtsrc/rtExternDefs.h"
172 
173 /*
174  * Flags used to determine or change the behavior of encoding and
175  * decoding.
176  */
178 #define XM_SEEK 0x01
179 
180 #define XM_ADVANCE 0x02
181 
182 #define XM_DYNAMIC 0x04
183 
184 #define XM_SKIP 0x08
185 
186 #define XM_OPTIONAL 0x10
187 
188 /* Sizing Constants */
189 
191 #define ASN_K_MAXDEPTH 32
192 
193 #define ASN_K_MAXENUM 100
194 
195 #define ASN_K_MAXERRP 5
196 
197 #define ASN_K_MAXERRSTK 8
198 
199 #ifndef ASN_K_ENCBUFSIZ
200 
201 #define ASN_K_ENCBUFSIZ 16*1024
202 #endif
203 
204 #ifndef ASN_K_MEMBUFSEG
205 
206 #define ASN_K_MEMBUFSEG 1024
207 #endif
208 
210 #define OSRTINDENTSPACES 3
211 
212 /* Constants for encoding/decoding real values */
213 
215 #define ASN1_K_PLUS_INFINITY 0x40
216 
218 #define ASN1_K_MINUS_INFINITY 0x41
219 
221 #define ASN1_K_NOT_A_NUMBER 0x42
222 
224 #define ASN1_K_MINUS_ZERO 0x43
225 
226 #define REAL_BINARY 0x80
227 #define REAL_SIGN 0x40
228 #define REAL_EXPLEN_MASK 0x03
229 #define REAL_EXPLEN_1 0x00
230 #define REAL_EXPLEN_2 0x01
231 #define REAL_EXPLEN_3 0x02
232 #define REAL_EXPLEN_LONG 0x03
233 #define REAL_FACTOR_MASK 0x0c
234 #define REAL_BASE_MASK 0x30
235 #define REAL_BASE_2 0x00
236 #define REAL_BASE_8 0x10
237 #define REAL_BASE_16 0x20
238 #define REAL_ISO6093_MASK 0x3F
239 
240 #ifndef __SYMBIAN32__
241 #include <float.h>
242 #define ASN1REALMAX (OSREAL)DBL_MAX
243 #define ASN1REALMIN (OSREAL)-DBL_MAX
244 #endif
245 
246 typedef void* ASN1ANY;
247 
252 typedef enum { ASN1HEX, ASN1BIN, ASN1CHR } ASN1StrType;
253 
257 typedef enum { ASN1ENCODE, ASN1DECODE } ASN1ActionType;
258 
259 /*
260  * OBJECT IDENTIFIER
261  */
270 #define ASN_K_MAXSUBIDS 128 /* maximum sub-id's in an object ID */
271 
275 typedef struct { /* object identifier */
277  OSUINT32 numids;
279  OSUINT32 subid[ASN_K_MAXSUBIDS];
280 } ASN1OBJID;
281 
286 typedef struct { /* object identifier */
289  OSBOOL memAllocated;
290 
292  OSUINT16 numids;
293 
295  OSUINT32* pSubIds;
296 } ASN1DynOBJID;
297 
301 typedef struct { /* object identifier with 64-bit arcs */
303  OSUINT32 numids;
305  OSUINT64 subid[ASN_K_MAXSUBIDS];
306 } ASN1OID64;
307 
309 #ifdef __cplusplus
310 #define EXTERN_C extern "C"
311 extern "C" {
312 #else
313 #define EXTERN_C extern
314 #endif
315 
331 EXTERNRT void rtSetOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
332 
348 EXTERNRT void rtAddOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
349 
357 EXTERNRT OSBOOL rtOIDsEqual (const ASN1OBJID* pOID1, const ASN1OBJID* pOID2);
358 
371 EXTERNRT int rtOIDParseCompList(const char* str, OSSIZE strlen,
372  ASN1OBJID* pvalue);
373 
386 EXTERNRT int rtOIDParseString
387 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
388 
389 
390 
403 EXTERNRT int rtRelOIDParseCompList(const char* str, OSSIZE strlen,
404  ASN1OBJID* pvalue);
405 
418 EXTERNRT int rtRelOIDParseString
419 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
420 
434 EXTERNRT int rtOIDParseDottedNumberString
435 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
436 
447 EXTERNRT OSBOOL rtOIDIsValid (const ASN1OBJID* pvalue);
448 
457 EXTERNRT int rtDecOIDSubIds
458 (OSCTXT* pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize, int enclen);
459 
464 /*
465  * OCTET STRING
466  */
471 typedef struct {
472  OSUINT32 numocts;
473  OSOCTET data[1];
474 } ASN1OctStr;
475 
477 #define ASN1DynOctStr OSDynOctStr
478 #define ASN1DynOctStr64 OSDynOctStr64
479 
480 /*
481  * BIT STRING
482  */
484 typedef struct {
485  OSUINT32 numbits;
486  const OSOCTET* data;
487 } ASN1DynBitStr;
488 
491 typedef struct {
492  OSSIZE numbits;
493  const OSOCTET* data;
495 
497 typedef struct {
498  OSUINT32 numbits;
499  OSOCTET data[4];
500 } ASN1BitStr32;
501 
502 #include "rtxsrc/rtxBitString.h"
503 
510 #define OSSETBIT(bitStr,bitIndex) \
511 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex)
512 
519 #define OSSETBITP(pBitStr,bitIndex) \
520 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
521 
528 #define OSCLEARBIT(bitStr,bitIndex) \
529 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex)
530 
537 #define OSCLEARBITP(pBitStr,bitIndex) \
538 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
539 
548 #define OSTESTBIT(bitStr,bitIndex) \
549 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex)
550 
557 #define OSTESTBITP(pBitStr,bitIndex) \
558 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
559 
585 #define ASN1TIMEFIELD_CENTURY 0x01
586 #define ASN1TIMEFIELD_YEAR 0x02
587 #define ASN1TIMEFIELD_MONTH 0x04
588 #define ASN1TIMEFIELD_DAY 0x08
589 #define ASN1TIMEFIELD_WEEK 0x10
590 #define ASN1TIMEFIELD_HOUR 0x20
591 #define ASN1TIMEFIELD_MIN 0x40
592 #define ASN1TIMEFIELD_SEC 0x80
593 #define ASN1TIMEFIELD_Z 0x0100
594 #define ASN1TIMEFIELD_DIFF 0x0200
595 #define ASN1TIMEFIELD_INTERVAL_SE 0x0400
596 #define ASN1TIMEFIELD_DURATION 0x0800
597 #define ASN1TIMEFIELD_INTERVAL_SD 0x1000
598 #define ASN1TIMEFIELD_INTERVAL_DE 0x2000
599 #define ASN1TIMEFIELD_RECUR_INF 0x4000
600 
601 /* ASN1TIMEFIELD_POINT includes all the settings that would be set for a
602  point in time (date, time-of-day or both) except for timezone diff. */
603 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \
604  ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \
605  ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \
606  ASN1TIMEFIELD_Z)
607 
608 typedef struct ASN1DateTime
609 {
610  OSINT32 century;
611  OSINT32 year;
612  OSUINT8 month;
613  OSUINT8 week;
614  OSUINT8 day;
615  OSUINT8 hour;
616  OSUINT8 min;
617  OSUINT8 sec;
618  OSUINT8 fracDigits;
619  OSUINT32 fracValue;
620  OSINT8 timezoneDifffHours;
621  OSUINT8 timezoneDiffMins;
622 } ASN1DateTime;
623 
634 typedef struct ASN1Duration
635 {
636  OSUINT32 years;
637  OSUINT32 months;
638  OSUINT32 weeks;
639  OSUINT32 days;
640  OSUINT32 hours;
641  OSUINT32 mins;
642  OSUINT32 secs;
643  OSUINT8 fracDigits;
644  OSUINT32 fracValue;
645  OSUINT8 precision; /* 1 = years, 2 = months etc., in the order in which
646  the componentas appear above. This indicates which
647  is the last component present. If fracDigits != 0,
648  this tells you what component the fraction belongs to.
649  Fields which are more precise than indicated by precision
650  MUST be set to zero. */
651 } ASN1Duration;
652 
656 typedef struct ASN1IntervalDE
657 {
658  ASN1Duration duration;
659  ASN1DateTime end;
661 
665 typedef struct ASN1IntervalSE
666 {
667  ASN1DateTime start;
668  ASN1DateTime end;
670 
674 typedef struct ASN1IntervalSD
675 {
676  ASN1DateTime start;
677  ASN1Duration duration;
679 
683 typedef struct ASN1Interval
684 {
685  union {
686  ASN1Duration duration;
687  ASN1IntervalDE de;
688  ASN1IntervalSE se;
689  ASN1IntervalSD sd;
690  } spec;
691  OSUINT32 recurrences;
692 } ASN1Interval;
693 
694 
699 typedef struct ASN1Time
700 {
705  OSUINT16 settings;
706 
707  union {
708  /* dateTime is use for abstract values that are only a date, a
709  time-of-day or a date and a time-of-day.*/
710  ASN1DateTime dateTime;
711 
712  /* interval is used for abstract values that are an interval.
713  If the interval has two points (start and end), they must use the same
714  settings.
715  The interval may be infinitely recurring (ASN1TIMEFIELD_RECUR_INF is
716  set in settings), finitely recurring (recurrences != 0), or
717  non-recurring (recurrences == 0).
718  The bit fields ASN1TIMEFIELD_DURATION, ASN1TIMEFIELD_INTERVAL_SD,
719  ASN1TIMEFIELD_INTERVAL_SE, and ASN1TIMEFIELD_INTERVAL_DE in settings are
720  used to distinguish the four possible cases.
721  */
722  ASN1Interval interval;
723  } val;
724 } ASN1Time;
725 
726 
751 EXTERNRT int rtMakeGeneralizedTime (OSCTXT* pctxt,
752  const OSNumDateTime* dateTime,
753  char** outdata,
754  size_t outdataSize);
755 
781 EXTERNRT int rtMakeTime(OSCTXT* pctxt,
782  const ASN1Time* timeVal,
783  char** outdata,
784  size_t outdataSize);
785 
786 
811 EXTERNRT int rtMakeUTCTime (OSCTXT* pctxt,
812  const OSNumDateTime* dateTime,
813  char** outdata,
814  size_t outdataSize);
834 EXTERNRT int rtParseGeneralizedTime (OSCTXT *pctxt,
835  const char* value,
836  OSNumDateTime* dateTime);
837 
855 EXTERNRT int rtParseGeneralizedTime2(OSCTXT *pctxt,
856  const char* value,
857  OSNumDateTime* dateTime,
858  OSBOOL logCanon);
859 
879 EXTERNRT int rtParseUTCTime (OSCTXT *pctxt,
880  const char* value,
881  OSNumDateTime* dateTime);
882 
900 EXTERNRT int rtParseUTCTime2(OSCTXT *pctxt,
901  const char* value,
902  OSNumDateTime* dateTime, OSBOOL logCanon);
903 
904 
919 EXTERNRT int rtParseTime(OSCTXT* pctxt, const char* value, ASN1Time* timeVal,
920  OSBOOL logCanon);
921 
922 
928 EXTERNRT void normalizeTimeZone(OSNumDateTime* pvalue);
929 
930 
935 /*
936  * SEQUENCE OF
937  */
942 typedef struct { /* generic sequence of structure */
944  OSUINT32 n;
945 
947  void* elem;
948 } ASN1SeqOf;
949 
955 typedef struct { /* sequence of OCTET STRING */
957  OSUINT32 n;
958 
960  OSDynOctStr* elem;
962 
967 typedef struct { /* generic open type data structure */
968  OSSIZE numocts;
969  const OSOCTET* data;
970 } ASN1OpenType;
971 
977 typedef struct { /* generic table constraint value holder */
978  ASN1OpenType encoded;
979  void* decoded;
980  OSINT32 index; /* table index */
981 } Asn1Object;
982 
983 typedef Asn1Object ASN1Object;
984 
989 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
990 typedef struct OSXSDAny {
991  OSXSDAnyAlt t;
992  union {
993  ASN1OpenType* binary;
994  const OSUTF8CHAR* xmlText;
995  } u;
996 } OSXSDAny;
997 
998 /* ASN.1 useful type definitions */
999 
1005 typedef struct {
1006  OSSIZE nchars;
1007  OSUNICHAR* data;
1009 
1010 typedef OSUNICHAR ASN116BITCHAR;
1011 
1017 typedef struct {
1018  OSSIZE nchars;
1019  OS32BITCHAR* data;
1021 
1022 typedef const char* ASN1GeneralizedTime;
1023 typedef const char* ASN1GeneralString;
1024 typedef const char* ASN1GraphicString;
1025 typedef const char* ASN1IA5String;
1026 typedef const char* ASN1ISO646String;
1027 typedef const char* ASN1NumericString;
1028 typedef const char* ASN1ObjectDescriptor;
1029 typedef const char* ASN1PrintableString;
1030 typedef const char* ASN1TeletexString;
1031 typedef const char* ASN1T61String;
1032 typedef const char* ASN1UTCTime;
1033 typedef const char* ASN1VideotexString;
1034 typedef const char* ASN1VisibleString;
1035 
1036 typedef const OSUTF8CHAR* ASN1UTF8String;
1039 
1040 /* ASN.1 constrained string structures */
1041 
1046 typedef struct {
1047  int nchars;
1048  char data[255];
1049 } Asn1CharArray;
1050 
1056 typedef struct {
1062 
1066  const char* canonicalSet;
1067 
1072 
1077 
1083 
1089 } Asn1CharSet;
1090 
1095 typedef struct {
1098 
1100  OSUINT16 firstChar, lastChar;
1101 
1103  unsigned unalignedBits;
1104 
1106  unsigned alignedBits;
1108 
1113 typedef struct {
1116 
1118  OSUINT32 firstChar, lastChar;
1119 
1121  unsigned unalignedBits;
1122 
1124  unsigned alignedBits;
1126 
1135 /* Helper functions. */
1136 
1149 EXTERNRT int rtValidateStr (ASN1TAG tag, const char *pdata);
1150 
1164 EXTERNRT int rtValidateChars (ASN1TAG tag, const char* pdata, size_t nchars);
1165 
1166 /* 16-bit character functions */
1167 
1178 EXTERNRT const char* rtBMPToCString (ASN1BMPString* pBMPString,
1179  char* cstring, OSSIZE cstrsize);
1180 
1191 EXTERNRT const char* rtBMPToNewCString (ASN1BMPString* pBMPString);
1192 
1206 EXTERNRT const char* rtBMPToNewCStringEx
1207  (OSCTXT *pctxt, ASN1BMPString* pBMPString);
1208 
1224 EXTERNRT ASN1BMPString* rtCToBMPString (OSCTXT* pctxt,
1225  const char* cstring,
1226  ASN1BMPString* pBMPString,
1227  Asn116BitCharSet* pCharSet);
1228 
1239 EXTERNRT OSBOOL rtIsIn16BitCharSet (OSUNICHAR ch,
1240  Asn116BitCharSet* pCharSet);
1241 
1242 /* 32-bit character (UCS-4) functions */
1243 
1244 
1256 EXTERNRT const char* rtUCSToCString (ASN1UniversalString* pUCSString,
1257  char* cstring, OSSIZE cstrsize);
1258 
1271 EXTERNRT const char* rtUCSToNewCString (ASN1UniversalString* pUCSString);
1272 
1287 EXTERNRT const char* rtUCSToNewCStringEx
1288 (OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1289 
1305 EXTERNRT ASN1UniversalString* rtCToUCSString
1306 (OSCTXT* pctxt, const char* cstring, ASN1UniversalString* pUCSString,
1307  Asn132BitCharSet* pCharSet);
1308 
1309 
1320 EXTERNRT OSBOOL rtIsIn32BitCharSet (OS32BITCHAR ch,
1321  Asn132BitCharSet* pCharSet);
1322 
1335 EXTERNRT wchar_t* rtUCSToWCSString (ASN1UniversalString* pUCSString,
1336  wchar_t* wcstring, OSUINT32 wcstrsize);
1337 
1338 
1356 EXTERNRT ASN1UniversalString* rtWCSToUCSString
1357 (OSCTXT* pctxt, wchar_t* wcstring,
1358  ASN1UniversalString* pUCSString, Asn132BitCharSet* pCharSet);
1359 
1371 EXTERNRT int rtUnivStrToUTF8
1372 (OSCTXT* pctxt, const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1373  size_t outbufsiz);
1374 
1389 EXTERNRT int rtUTF8StrToASN1DynBitStr
1390  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, ASN1DynBitStr* pvalue);
1391 
1408 EXTERNRT int rtUTF8StrnToASN1DynBitStr
1409  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, size_t nbytes,
1410  ASN1DynBitStr* pvalue);
1411 
1422 typedef struct ASN1BigInt {
1424  size_t numocts;
1425 
1427  OSOCTET* mag;
1428 
1430  int sign;
1431 
1433  size_t allocated;
1434 
1436  OSBOOL dynamic;
1437 } ASN1BigInt;
1438 
1440 #define ASN1_K_CCBMaskSize 32
1441 
1443 #define ASN1_K_NumBitsPerMask 16
1444 
1446 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask)
1447 
1455 typedef struct {
1457  OSOCTET* ptr;
1458 
1460  long len;
1461 
1463  int seqx;
1464 
1466  OSUINT16 mask[ASN1_K_CCBMaskSize];
1467 
1469  OSSIZE bytes;
1470 
1472  int stat;
1473 } ASN1CCB;
1474 
1476 typedef int (*ASN1DumpCbFunc) (const char* text_p, void* cbArg_p);
1477  // close the cruntime group. We reopen it later.
1479 
1480 /*
1481 I don't know why the following memory allocation macros are defined here. They
1482 seem to belong to the rtmem group, so I've designated that here.
1483 If we don't close the cruntime group first, the rtmem group will become a
1484 subgroup of the cruntime group.
1485 */
1486 
1503 #define ALLOC_ASN1ARRAY(pctxt,pseqof,type) do {\
1504 if (sizeof(type)*(pseqof)->n < (pseqof)->n) return RTERR_NOMEM; \
1505 if (((pseqof)->elem = (type*) rtxMemHeapAllocZ \
1506 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n)) == 0) return RTERR_NOMEM; \
1507 } while (0)
1508 
1521 #define ALLOC_ASN1ARRAY1(pctxt,pseqof,type) do {\
1522 if (sizeof(type)*(pseqof)->n < (pseqof)->n) (pseqof)->elem = 0; \
1523 else (pseqof)->elem = (type*) rtxMemHeapAllocZ \
1524 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n); \
1525 } while (0)
1526  //Reopen the cruntime group.
1535 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0)
1536 
1537 #ifdef __cplusplus
1538 }
1539 #endif
1540 
1541 #include "rtsrc/rtContext.h"
1542 #include "rtxsrc/rtxCommonDefs.h"
1543 #include "rtxsrc/rtxError.h"
1544 #include "rtxsrc/rtxMemory.h"
1545 
1550 #endif
OSOCTET * mag
Definition: asn1type.h:1427
int rtParseUTCTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
Definition: asn1type.h:1422
Definition: asn1type.h:656
OSOCTET * ptr
Definition: asn1type.h:1457
const char * canonicalSet
Definition: asn1type.h:1066
OSUINT32 numids
Definition: asn1type.h:277
int rtMakeGeneralizedTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:1005
OSUINT32 numids
Definition: asn1type.h:303
int rtUnivStrToUTF8(OSCTXT *pctxt, const ASN1UniversalString *pUnivStr, OSOCTET *outbuf, size_t outbufsiz)
int rtUTF8StrnToASN1DynBitStr(OSCTXT *pctxt, const OSUTF8CHAR *utf8str, size_t nbytes, ASN1DynBitStr *pvalue)
OSBOOL rtIsIn16BitCharSet(OSUNICHAR ch, Asn116BitCharSet *pCharSet)
void normalizeTimeZone(OSNumDateTime *pvalue)
int rtParseTime(OSCTXT *pctxt, const char *value, ASN1Time *timeVal, OSBOOL logCanon)
Definition: asn1type.h:497
OSSIZE bytes
Definition: asn1type.h:1469
Definition: asn1type.h:608
unsigned alignedBits
Definition: asn1type.h:1106
Definition: asn1type.h:967
Definition: asn1type.h:955
Definition: asn1type.h:1046
Definition: asn1type.h:286
OSUINT16 numids
Definition: asn1type.h:292
struct ASN1Time ASN1Time
Definition: asn1type.h:275
OSBOOL dynamic
Definition: asn1type.h:1436
ASN1StrType
Definition: asn1type.h:252
OSUINT32 firstChar
Definition: asn1type.h:1118
int rtParseUTCTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
struct ASN1BigInt ASN1BigInt
const char * rtUCSToNewCStringEx(OSCTXT *pctxt, ASN1UniversalString *pUCSString)
ASN1UniversalString * rtWCSToUCSString(OSCTXT *pctxt, wchar_t *wcstring, ASN1UniversalString *pUCSString, Asn132BitCharSet *pCharSet)
unsigned unalignedBits
Definition: asn1type.h:1121
OSUINT32 n
Definition: asn1type.h:957
struct ASN1IntervalSE ASN1IntervalSE
OSDynOctStr * elem
Definition: asn1type.h:960
Definition: asn1type.h:1056
ASN1UniversalString * rtCToUCSString(OSCTXT *pctxt, const char *cstring, ASN1UniversalString *pUCSString, Asn132BitCharSet *pCharSet)
Definition: asn1type.h:301
int rtUTF8StrToASN1DynBitStr(OSCTXT *pctxt, const OSUTF8CHAR *utf8str, ASN1DynBitStr *pvalue)
Asn132BitCharString charSet
Definition: asn1type.h:1115
void rtSetOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
OSUINT16 settings
Definition: asn1type.h:705
int rtMakeTime(OSCTXT *pctxt, const ASN1Time *timeVal, char **outdata, size_t outdataSize)
Definition: asn1type.h:665
OSUINT32 n
Definition: asn1type.h:944
ASN1BMPString * rtCToBMPString(OSCTXT *pctxt, const char *cstring, ASN1BMPString *pBMPString, Asn116BitCharSet *pCharSet)
int rtOIDParseCompList(const char *str, OSSIZE strlen, ASN1OBJID *pvalue)
unsigned charSetAlignedBits
Definition: asn1type.h:1088
int seqx
Definition: asn1type.h:1463
Definition: asn1type.h:1095
int sign
Definition: asn1type.h:1430
struct ASN1IntervalSD ASN1IntervalSD
Definition: asn1type.h:683
int rtValidateStr(ASN1TAG tag, const char *pdata)
int canonicalSetSize
Definition: asn1type.h:1071
OSUINT16 firstChar
Definition: asn1type.h:1100
struct ASN1Duration ASN1Duration
Definition: asn1type.h:634
int rtDecOIDSubIds(OSCTXT *pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize, int enclen)
Definition: asn1type.h:1113
int rtRelOIDParseCompList(const char *str, OSSIZE strlen, ASN1OBJID *pvalue)
size_t allocated
Definition: asn1type.h:1433
unsigned alignedBits
Definition: asn1type.h:1124
int rtOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
const char * rtUCSToNewCString(ASN1UniversalString *pUCSString)
unsigned unalignedBits
Definition: asn1type.h:1103
Asn116BitCharString charSet
Definition: asn1type.h:1097
OSBOOL rtIsIn32BitCharSet(OS32BITCHAR ch, Asn132BitCharSet *pCharSet)
OSBOOL rtOIDIsValid(const ASN1OBJID *pvalue)
struct ASN1IntervalDE ASN1IntervalDE
Definition: asn1type.h:942
size_t numocts
Definition: asn1type.h:1424
int rtRelOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
Definition: asn1type.h:1017
#define ASN1_K_CCBMaskSize
Definition: asn1type.h:1440
Definition: asn1type.h:491
int rtParseGeneralizedTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
void rtAddOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
unsigned charSetUnalignedBits
Definition: asn1type.h:1082
const char * rtBMPToCString(ASN1BMPString *pBMPString, char *cstring, OSSIZE cstrsize)
const char * rtBMPToNewCStringEx(OSCTXT *pctxt, ASN1BMPString *pBMPString)
Definition: asn1type.h:484
Definition: asn1type.h:699
Definition: asn1type.h:674
OSUINT32 * pSubIds
Definition: asn1type.h:295
unsigned canonicalSetBits
Definition: asn1type.h:1076
Definition: asn1type.h:990
const char * rtBMPToNewCString(ASN1BMPString *pBMPString)
long len
Definition: asn1type.h:1460
struct ASN1Interval ASN1Interval
wchar_t * rtUCSToWCSString(ASN1UniversalString *pUCSString, wchar_t *wcstring, OSUINT32 wcstrsize)
int stat
Definition: asn1type.h:1472
int rtValidateChars(ASN1TAG tag, const char *pdata, size_t nchars)
Definition: rtxContext.h:198
Definition: asn1type.h:1455
OSBOOL rtOIDsEqual(const ASN1OBJID *pOID1, const ASN1OBJID *pOID2)
Definition: asn1type.h:977
int rtParseGeneralizedTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
void * elem
Definition: asn1type.h:947
const char * rtUCSToCString(ASN1UniversalString *pUCSString, char *cstring, OSSIZE cstrsize)
int(* ASN1DumpCbFunc)(const char *text_p, void *cbArg_p)
Definition: asn1type.h:1476
ASN1ActionType
Definition: asn1type.h:257
int rtMakeUTCTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:471
Asn1CharArray charSet
Definition: asn1type.h:1061
OSBOOL memAllocated
Definition: asn1type.h:289
int rtOIDParseDottedNumberString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)