ASN1C C/C++ Common Runtime  ASN1C v7.8.x
asn1type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2022 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 
359 EXTERNRT int rtOIDAsn2Xml(char* oidstr, OSSIZE oidlen, OSSIZE buflen,
360  OSBOOL bRelative,
361  OSSIZE* resultlen);
362 
363 
378 EXTERNRT void rtSetOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
379 
395 EXTERNRT void rtAddOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
396 
404 EXTERNRT OSBOOL rtOIDsEqual (const ASN1OBJID* pOID1, const ASN1OBJID* pOID2);
405 
418 EXTERNRT int rtOIDParseCompList(const char* str, OSSIZE strlen,
419  ASN1OBJID* pvalue);
420 
433 EXTERNRT int rtOIDParseString
434 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
435 
436 
437 
450 EXTERNRT int rtRelOIDParseCompList(const char* str, OSSIZE strlen,
451  ASN1OBJID* pvalue);
452 
465 EXTERNRT int rtRelOIDParseString
466 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
467 
481 EXTERNRT int rtOIDParseDottedNumberString
482 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
483 
494 EXTERNRT OSBOOL rtOIDIsValid (const ASN1OBJID* pvalue);
495 
504 EXTERNRT int rtDecOIDSubIds
505 (OSCTXT* pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize, int enclen);
506 
511 /*
512  * OCTET STRING
513  */
518 typedef struct {
519  OSUINT32 numocts;
520  OSOCTET data[1];
521 } ASN1OctStr;
522 
524 #define ASN1DynOctStr OSDynOctStr
525 #define ASN1DynOctStr64 OSDynOctStr64
526 
527 /*
528  * BIT STRING
529  */
531 typedef struct {
532  OSUINT32 numbits;
533  const OSOCTET* data;
534 } ASN1DynBitStr;
535 
538 typedef struct {
539  OSSIZE numbits;
540  const OSOCTET* data;
542 
544 typedef struct {
545  OSUINT32 numbits;
546  OSOCTET data[4];
547 } ASN1BitStr32;
548 
549 #include "rtxsrc/rtxBitString.h"
550 
557 #define OSSETBIT(bitStr,bitIndex) \
558 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex)
559 
566 #define OSSETBITP(pBitStr,bitIndex) \
567 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
568 
575 #define OSCLEARBIT(bitStr,bitIndex) \
576 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex)
577 
584 #define OSCLEARBITP(pBitStr,bitIndex) \
585 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
586 
595 #define OSTESTBIT(bitStr,bitIndex) \
596 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex)
597 
604 #define OSTESTBITP(pBitStr,bitIndex) \
605 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
606 
632 #define ASN1TIMEFIELD_CENTURY 0x01
633 #define ASN1TIMEFIELD_YEAR 0x02
634 #define ASN1TIMEFIELD_MONTH 0x04
635 #define ASN1TIMEFIELD_DAY 0x08
636 #define ASN1TIMEFIELD_WEEK 0x10
637 #define ASN1TIMEFIELD_HOUR 0x20
638 #define ASN1TIMEFIELD_MIN 0x40
639 #define ASN1TIMEFIELD_SEC 0x80
640 #define ASN1TIMEFIELD_Z 0x0100
641 #define ASN1TIMEFIELD_DIFF 0x0200
642 #define ASN1TIMEFIELD_INTERVAL_SE 0x0400
643 #define ASN1TIMEFIELD_DURATION 0x0800
644 #define ASN1TIMEFIELD_INTERVAL_SD 0x1000
645 #define ASN1TIMEFIELD_INTERVAL_DE 0x2000
646 #define ASN1TIMEFIELD_RECUR_INF 0x4000
647 
648 /* ASN1TIMEFIELD_POINT includes all the settings that would be set for a
649  point in time (date, time-of-day or both) except for timezone diff. */
650 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \
651  ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \
652  ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \
653  ASN1TIMEFIELD_Z)
654 
655 typedef struct ASN1DateTime
656 {
657  OSINT32 century;
658  OSINT32 year;
659  OSUINT8 month;
660  OSUINT8 week;
661  OSUINT8 day;
662  OSUINT8 hour;
663  OSUINT8 min;
664  OSUINT8 sec;
665  OSUINT8 fracDigits;
666  OSUINT32 fracValue;
667  OSINT8 timezoneDifffHours;
668  OSUINT8 timezoneDiffMins;
669 } ASN1DateTime;
670 
681 typedef struct ASN1Duration
682 {
683  OSUINT32 years;
684  OSUINT32 months;
685  OSUINT32 weeks;
686  OSUINT32 days;
687  OSUINT32 hours;
688  OSUINT32 mins;
689  OSUINT32 secs;
690  OSUINT8 fracDigits;
691  OSUINT32 fracValue;
692  OSUINT8 precision; /* 1 = years, 2 = months etc., in the order in which
693  the componentas appear above. This indicates which
694  is the last component present. If fracDigits != 0,
695  this tells you what component the fraction belongs to.
696  Fields which are more precise than indicated by precision
697  MUST be set to zero. */
698 } ASN1Duration;
699 
703 typedef struct ASN1IntervalDE
704 {
705  ASN1Duration duration;
706  ASN1DateTime end;
708 
712 typedef struct ASN1IntervalSE
713 {
714  ASN1DateTime start;
715  ASN1DateTime end;
717 
721 typedef struct ASN1IntervalSD
722 {
723  ASN1DateTime start;
724  ASN1Duration duration;
726 
730 typedef struct ASN1Interval
731 {
732  union {
733  ASN1Duration duration;
734  ASN1IntervalDE de;
735  ASN1IntervalSE se;
736  ASN1IntervalSD sd;
737  } spec;
738  OSUINT32 recurrences;
739 } ASN1Interval;
740 
741 
746 typedef struct ASN1Time
747 {
752  OSUINT16 settings;
753 
754  union {
755  /* dateTime is use for abstract values that are only a date, a
756  time-of-day or a date and a time-of-day.*/
757  ASN1DateTime dateTime;
758 
759  /* interval is used for abstract values that are an interval.
760  If the interval has two points (start and end), they must use the same
761  settings.
762  The interval may be infinitely recurring (ASN1TIMEFIELD_RECUR_INF is
763  set in settings), finitely recurring (recurrences != 0), or
764  non-recurring (recurrences == 0).
765  The bit fields ASN1TIMEFIELD_DURATION, ASN1TIMEFIELD_INTERVAL_SD,
766  ASN1TIMEFIELD_INTERVAL_SE, and ASN1TIMEFIELD_INTERVAL_DE in settings are
767  used to distinguish the four possible cases.
768  */
769  ASN1Interval interval;
770  } val;
771 } ASN1Time;
772 
773 
798 EXTERNRT int rtMakeGeneralizedTime (OSCTXT* pctxt,
799  const OSNumDateTime* dateTime,
800  char** outdata,
801  size_t outdataSize);
802 
828 EXTERNRT int rtMakeTime(OSCTXT* pctxt,
829  const ASN1Time* timeVal,
830  char** outdata,
831  size_t outdataSize);
832 
833 
858 EXTERNRT int rtMakeUTCTime (OSCTXT* pctxt,
859  const OSNumDateTime* dateTime,
860  char** outdata,
861  size_t outdataSize);
881 EXTERNRT int rtParseGeneralizedTime (OSCTXT *pctxt,
882  const char* value,
883  OSNumDateTime* dateTime);
884 
902 EXTERNRT int rtParseGeneralizedTime2(OSCTXT *pctxt,
903  const char* value,
904  OSNumDateTime* dateTime,
905  OSBOOL logCanon);
906 
926 EXTERNRT int rtParseUTCTime (OSCTXT *pctxt,
927  const char* value,
928  OSNumDateTime* dateTime);
929 
947 EXTERNRT int rtParseUTCTime2(OSCTXT *pctxt,
948  const char* value,
949  OSNumDateTime* dateTime, OSBOOL logCanon);
950 
951 
966 EXTERNRT int rtParseTime(OSCTXT* pctxt, const char* value, ASN1Time* timeVal,
967  OSBOOL logCanon);
968 
969 
975 EXTERNRT void normalizeTimeZone(OSNumDateTime* pvalue);
976 
977 
982 /*
983  * SEQUENCE OF
984  */
989 typedef struct { /* generic sequence of structure */
991  OSUINT32 n;
992 
994  void* elem;
995 } ASN1SeqOf;
996 
1002 typedef struct { /* sequence of OCTET STRING */
1004  OSUINT32 n;
1005 
1007  OSDynOctStr* elem;
1008 } ASN1SeqOfOctStr;
1009 
1014 typedef struct { /* generic open type data structure */
1015  OSSIZE numocts;
1016  const OSOCTET* data;
1017 } ASN1OpenType;
1018 
1024 typedef struct { /* generic table constraint value holder */
1025  ASN1OpenType encoded;
1026  void* decoded;
1027  OSINT32 index; /* table index */
1028 } Asn1Object;
1029 
1030 typedef Asn1Object ASN1Object;
1031 
1036 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
1037 typedef struct OSXSDAny {
1038  OSXSDAnyAlt t;
1039  union {
1040  ASN1OpenType* binary;
1041  const OSUTF8CHAR* xmlText;
1042  } u;
1043 } OSXSDAny;
1044 
1045 /* ASN.1 useful type definitions */
1046 
1052 typedef struct {
1053  OSSIZE nchars;
1054  OSUNICHAR* data;
1056 
1057 typedef OSUNICHAR ASN116BITCHAR;
1058 
1064 typedef struct {
1065  OSSIZE nchars;
1066  OS32BITCHAR* data;
1068 
1069 typedef const char* ASN1GeneralizedTime;
1070 typedef const char* ASN1GeneralString;
1071 typedef const char* ASN1GraphicString;
1072 typedef const char* ASN1IA5String;
1073 typedef const char* ASN1ISO646String;
1074 typedef const char* ASN1NumericString;
1075 typedef const char* ASN1ObjectDescriptor;
1076 typedef const char* ASN1PrintableString;
1077 typedef const char* ASN1TeletexString;
1078 typedef const char* ASN1T61String;
1079 typedef const char* ASN1UTCTime;
1080 typedef const char* ASN1VideotexString;
1081 typedef const char* ASN1VisibleString;
1082 
1083 typedef const OSUTF8CHAR* ASN1UTF8String;
1086 
1087 /* ASN.1 constrained string structures */
1088 
1093 typedef struct {
1094  int nchars;
1095  char data[255];
1096 } Asn1CharArray;
1097 
1103 typedef struct {
1109 
1113  const char* canonicalSet;
1114 
1119 
1124 
1130 
1136 } Asn1CharSet;
1137 
1142 typedef struct {
1145 
1147  OSUINT16 firstChar, lastChar;
1148 
1150  unsigned unalignedBits;
1151 
1153  unsigned alignedBits;
1155 
1160 typedef struct {
1163 
1165  OSUINT32 firstChar, lastChar;
1166 
1168  unsigned unalignedBits;
1169 
1171  unsigned alignedBits;
1173 
1182 /* Helper functions. */
1183 
1196 EXTERNRT int rtValidateStr (ASN1TAG tag, const char *pdata);
1197 
1211 EXTERNRT int rtValidateChars (ASN1TAG tag, const char* pdata, size_t nchars);
1212 
1213 /* 16-bit character functions */
1214 
1225 EXTERNRT const char* rtBMPToCString (ASN1BMPString* pBMPString,
1226  char* cstring, OSSIZE cstrsize);
1227 
1238 EXTERNRT const char* rtBMPToNewCString (ASN1BMPString* pBMPString);
1239 
1253 EXTERNRT const char* rtBMPToNewCStringEx
1254  (OSCTXT *pctxt, ASN1BMPString* pBMPString);
1255 
1271 EXTERNRT ASN1BMPString* rtCToBMPString (OSCTXT* pctxt,
1272  const char* cstring,
1273  ASN1BMPString* pBMPString,
1274  Asn116BitCharSet* pCharSet);
1275 
1286 EXTERNRT OSBOOL rtIsIn16BitCharSet (OSUNICHAR ch,
1287  Asn116BitCharSet* pCharSet);
1288 
1289 /* 32-bit character (UCS-4) functions */
1290 
1291 
1303 EXTERNRT const char* rtUCSToCString (ASN1UniversalString* pUCSString,
1304  char* cstring, OSSIZE cstrsize);
1305 
1318 EXTERNRT const char* rtUCSToNewCString (ASN1UniversalString* pUCSString);
1319 
1334 EXTERNRT const char* rtUCSToNewCStringEx
1335 (OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1336 
1352 EXTERNRT ASN1UniversalString* rtCToUCSString
1353 (OSCTXT* pctxt, const char* cstring, ASN1UniversalString* pUCSString,
1354  Asn132BitCharSet* pCharSet);
1355 
1356 
1367 EXTERNRT OSBOOL rtIsIn32BitCharSet (OS32BITCHAR ch,
1368  Asn132BitCharSet* pCharSet);
1369 
1382 EXTERNRT wchar_t* rtUCSToWCSString (ASN1UniversalString* pUCSString,
1383  wchar_t* wcstring, OSUINT32 wcstrsize);
1384 
1385 
1403 EXTERNRT ASN1UniversalString* rtWCSToUCSString
1404 (OSCTXT* pctxt, wchar_t* wcstring,
1405  ASN1UniversalString* pUCSString, Asn132BitCharSet* pCharSet);
1406 
1418 EXTERNRT int rtUnivStrToUTF8
1419 (OSCTXT* pctxt, const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1420  size_t outbufsiz);
1421 
1436 EXTERNRT int rtUTF8StrToASN1DynBitStr
1437  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, ASN1DynBitStr* pvalue);
1438 
1455 EXTERNRT int rtUTF8StrnToASN1DynBitStr
1456  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, size_t nbytes,
1457  ASN1DynBitStr* pvalue);
1458 
1469 typedef struct ASN1BigInt {
1471  size_t numocts;
1472 
1474  OSOCTET* mag;
1475 
1477  int sign;
1478 
1480  size_t allocated;
1481 
1483  OSBOOL dynamic;
1484 } ASN1BigInt;
1485 
1487 #define ASN1_K_CCBMaskSize 32
1488 
1490 #define ASN1_K_NumBitsPerMask 16
1491 
1493 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask)
1494 
1502 typedef struct {
1504  OSOCTET* ptr;
1505 
1507  long len;
1508 
1510  int seqx;
1511 
1513  OSUINT16 mask[ASN1_K_CCBMaskSize];
1514 
1516  OSSIZE bytes;
1517 
1519  int stat;
1520 } ASN1CCB;
1521 
1523 typedef int (*ASN1DumpCbFunc) (const char* text_p, void* cbArg_p);
1524  // close the cruntime group. We reopen it later.
1526 
1527 /*
1528 I don't know why the following memory allocation macros are defined here. They
1529 seem to belong to the rtmem group, so I've designated that here.
1530 If we don't close the cruntime group first, the rtmem group will become a
1531 subgroup of the cruntime group.
1532 */
1533 
1550 #define ALLOC_ASN1ARRAY(pctxt,pseqof,type) do {\
1551 if (sizeof(type)*(pseqof)->n < (pseqof)->n) return RTERR_NOMEM; \
1552 if (((pseqof)->elem = (type*) rtxMemHeapAllocZ \
1553 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n)) == 0) return RTERR_NOMEM; \
1554 } while (0)
1555 
1568 #define ALLOC_ASN1ARRAY1(pctxt,pseqof,type) do {\
1569 if (sizeof(type)*(pseqof)->n < (pseqof)->n) (pseqof)->elem = 0; \
1570 else (pseqof)->elem = (type*) rtxMemHeapAllocZ \
1571 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n); \
1572 } while (0)
1573  //Reopen the cruntime group.
1582 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0)
1583 
1584 #ifdef __cplusplus
1585 }
1586 #endif
1587 
1588 #include "rtsrc/rtContext.h"
1589 #include "rtxsrc/rtxCommonDefs.h"
1590 #include "rtxsrc/rtxError.h"
1591 #include "rtxsrc/rtxMemory.h"
1592 
1597 #endif
OSOCTET * mag
Definition: asn1type.h:1474
int rtParseUTCTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
Definition: asn1type.h:1469
Definition: asn1type.h:703
OSOCTET * ptr
Definition: asn1type.h:1504
const char * canonicalSet
Definition: asn1type.h:1113
OSUINT32 numids
Definition: asn1type.h:277
int rtMakeGeneralizedTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:1052
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:544
OSSIZE bytes
Definition: asn1type.h:1516
Definition: asn1type.h:655
unsigned alignedBits
Definition: asn1type.h:1153
Definition: asn1type.h:1014
Definition: asn1type.h:1002
Definition: asn1type.h:1093
Definition: asn1type.h:286
OSUINT16 numids
Definition: asn1type.h:292
struct ASN1Time ASN1Time
Definition: asn1type.h:275
OSBOOL dynamic
Definition: asn1type.h:1483
ASN1StrType
Definition: asn1type.h:252
OSUINT32 firstChar
Definition: asn1type.h:1165
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:1168
OSUINT32 n
Definition: asn1type.h:1004
struct ASN1IntervalSE ASN1IntervalSE
OSDynOctStr * elem
Definition: asn1type.h:1007
Definition: asn1type.h:1103
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:1162
void rtSetOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
OSUINT16 settings
Definition: asn1type.h:752
int rtMakeTime(OSCTXT *pctxt, const ASN1Time *timeVal, char **outdata, size_t outdataSize)
Definition: asn1type.h:712
OSUINT32 n
Definition: asn1type.h:991
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:1135
int seqx
Definition: asn1type.h:1510
Definition: asn1type.h:1142
int sign
Definition: asn1type.h:1477
struct ASN1IntervalSD ASN1IntervalSD
Definition: asn1type.h:730
int rtValidateStr(ASN1TAG tag, const char *pdata)
int canonicalSetSize
Definition: asn1type.h:1118
OSUINT16 firstChar
Definition: asn1type.h:1147
struct ASN1Duration ASN1Duration
Definition: asn1type.h:681
int rtDecOIDSubIds(OSCTXT *pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize, int enclen)
Definition: asn1type.h:1160
int rtRelOIDParseCompList(const char *str, OSSIZE strlen, ASN1OBJID *pvalue)
size_t allocated
Definition: asn1type.h:1480
unsigned alignedBits
Definition: asn1type.h:1171
int rtOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
const char * rtUCSToNewCString(ASN1UniversalString *pUCSString)
unsigned unalignedBits
Definition: asn1type.h:1150
Asn116BitCharString charSet
Definition: asn1type.h:1144
OSBOOL rtIsIn32BitCharSet(OS32BITCHAR ch, Asn132BitCharSet *pCharSet)
OSBOOL rtOIDIsValid(const ASN1OBJID *pvalue)
struct ASN1IntervalDE ASN1IntervalDE
Definition: asn1type.h:989
size_t numocts
Definition: asn1type.h:1471
int rtRelOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
Definition: asn1type.h:1064
#define ASN1_K_CCBMaskSize
Definition: asn1type.h:1487
Definition: asn1type.h:538
int rtParseGeneralizedTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
void rtAddOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
unsigned charSetUnalignedBits
Definition: asn1type.h:1129
const char * rtBMPToCString(ASN1BMPString *pBMPString, char *cstring, OSSIZE cstrsize)
const char * rtBMPToNewCStringEx(OSCTXT *pctxt, ASN1BMPString *pBMPString)
Definition: asn1type.h:531
Definition: asn1type.h:746
Definition: asn1type.h:721
OSUINT32 * pSubIds
Definition: asn1type.h:295
unsigned canonicalSetBits
Definition: asn1type.h:1123
Definition: asn1type.h:1037
const char * rtBMPToNewCString(ASN1BMPString *pBMPString)
long len
Definition: asn1type.h:1507
struct ASN1Interval ASN1Interval
wchar_t * rtUCSToWCSString(ASN1UniversalString *pUCSString, wchar_t *wcstring, OSUINT32 wcstrsize)
int stat
Definition: asn1type.h:1519
int rtValidateChars(ASN1TAG tag, const char *pdata, size_t nchars)
Definition: rtxContext.h:198
Definition: asn1type.h:1502
int rtOIDAsn2Xml(char *oidstr, OSSIZE oidlen, OSSIZE buflen, OSBOOL bRelative, OSSIZE *resultlen)
OSBOOL rtOIDsEqual(const ASN1OBJID *pOID1, const ASN1OBJID *pOID2)
Definition: asn1type.h:1024
int rtParseGeneralizedTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
void * elem
Definition: asn1type.h:994
const char * rtUCSToCString(ASN1UniversalString *pUCSString, char *cstring, OSSIZE cstrsize)
int(* ASN1DumpCbFunc)(const char *text_p, void *cbArg_p)
Definition: asn1type.h:1523
ASN1ActionType
Definition: asn1type.h:257
int rtMakeUTCTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:518
Asn1CharArray charSet
Definition: asn1type.h:1108
OSBOOL memAllocated
Definition: asn1type.h:289
int rtOIDParseDottedNumberString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)