ASN1C C/C++ Common Runtime  ASN1C v7.6.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 
285 typedef struct { /* object identifier with 64-bit arcs */
287  OSUINT32 numids;
289  OSUINT64 subid[ASN_K_MAXSUBIDS];
290 } ASN1OID64;
291 
293 #ifdef __cplusplus
294 #define EXTERN_C extern "C"
295 extern "C" {
296 #else
297 #define EXTERN_C extern
298 #endif
299 
315 EXTERNRT void rtSetOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
316 
332 EXTERNRT void rtAddOID (ASN1OBJID* ptarget, ASN1OBJID* psource);
333 
341 EXTERNRT OSBOOL rtOIDsEqual (const ASN1OBJID* pOID1, const ASN1OBJID* pOID2);
342 
355 EXTERNRT int rtOIDParseCompList(const char* str, OSSIZE strlen,
356  ASN1OBJID* pvalue);
357 
370 EXTERNRT int rtOIDParseString
371 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
372 
373 
374 
387 EXTERNRT int rtRelOIDParseCompList(const char* str, OSSIZE strlen,
388  ASN1OBJID* pvalue);
389 
390 
403 EXTERNRT int rtRelOIDParseString
404 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
405 
419 EXTERNRT int rtOIDParseDottedNumberString
420 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
421 
432 EXTERNRT OSBOOL rtOIDIsValid (const ASN1OBJID* pvalue);
433 
438 /*
439  * OCTET STRING
440  */
445 typedef struct {
446  OSUINT32 numocts;
447  OSOCTET data[1];
448 } ASN1OctStr;
449 
451 #define ASN1DynOctStr OSDynOctStr
452 #define ASN1DynOctStr64 OSDynOctStr64
453 
454 /*
455  * BIT STRING
456  */
458 typedef struct {
459  OSUINT32 numbits;
460  const OSOCTET* data;
461 } ASN1DynBitStr;
462 
465 typedef struct {
466  OSSIZE numbits;
467  const OSOCTET* data;
469 
471 typedef struct {
472  OSUINT32 numbits;
473  OSOCTET data[4];
474 } ASN1BitStr32;
475 
476 #include "rtxsrc/rtxBitString.h"
477 
484 #define OSSETBIT(bitStr,bitIndex) \
485 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex)
486 
493 #define OSSETBITP(pBitStr,bitIndex) \
494 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
495 
502 #define OSCLEARBIT(bitStr,bitIndex) \
503 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex)
504 
511 #define OSCLEARBITP(pBitStr,bitIndex) \
512 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
513 
522 #define OSTESTBIT(bitStr,bitIndex) \
523 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex)
524 
531 #define OSTESTBITP(pBitStr,bitIndex) \
532 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
533 
559 #define ASN1TIMEFIELD_CENTURY 0x01
560 #define ASN1TIMEFIELD_YEAR 0x02
561 #define ASN1TIMEFIELD_MONTH 0x04
562 #define ASN1TIMEFIELD_DAY 0x08
563 #define ASN1TIMEFIELD_WEEK 0x10
564 #define ASN1TIMEFIELD_HOUR 0x20
565 #define ASN1TIMEFIELD_MIN 0x40
566 #define ASN1TIMEFIELD_SEC 0x80
567 #define ASN1TIMEFIELD_Z 0x0100
568 #define ASN1TIMEFIELD_DIFF 0x0200
569 #define ASN1TIMEFIELD_INTERVAL_SE 0x0400
570 #define ASN1TIMEFIELD_DURATION 0x0800
571 #define ASN1TIMEFIELD_INTERVAL_SD 0x1000
572 #define ASN1TIMEFIELD_INTERVAL_DE 0x2000
573 #define ASN1TIMEFIELD_RECUR_INF 0x4000
574 
575 /* ASN1TIMEFIELD_POINT includes all the settings that would be set for a
576  point in time (date, time-of-day or both) except for timezone diff. */
577 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \
578  ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \
579  ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \
580  ASN1TIMEFIELD_Z)
581 
582 typedef struct ASN1DateTime
583 {
584  OSINT32 century;
585  OSINT32 year;
586  OSUINT8 month;
587  OSUINT8 week;
588  OSUINT8 day;
589  OSUINT8 hour;
590  OSUINT8 min;
591  OSUINT8 sec;
592  OSUINT8 fracDigits;
593  OSUINT32 fracValue;
594  OSINT8 timezoneDifffHours;
595  OSUINT8 timezoneDiffMins;
596 } ASN1DateTime;
597 
608 typedef struct ASN1Duration
609 {
610  OSUINT32 years;
611  OSUINT32 months;
612  OSUINT32 weeks;
613  OSUINT32 days;
614  OSUINT32 hours;
615  OSUINT32 mins;
616  OSUINT32 secs;
617  OSUINT8 fracDigits;
618  OSUINT32 fracValue;
619  OSUINT8 precision; /* 1 = years, 2 = months etc., in the order in which
620  the componentas appear above. This indicates which
621  is the last component present. If fracDigits != 0,
622  this tells you what component the fraction belongs to.
623  Fields which are more precise than indicated by precision
624  MUST be set to zero. */
625 } ASN1Duration;
626 
630 typedef struct ASN1IntervalDE
631 {
632  ASN1Duration duration;
633  ASN1DateTime end;
635 
639 typedef struct ASN1IntervalSE
640 {
641  ASN1DateTime start;
642  ASN1DateTime end;
644 
648 typedef struct ASN1IntervalSD
649 {
650  ASN1DateTime start;
651  ASN1Duration duration;
653 
657 typedef struct ASN1Interval
658 {
659  union {
660  ASN1Duration duration;
661  ASN1IntervalDE de;
662  ASN1IntervalSE se;
663  ASN1IntervalSD sd;
664  } spec;
665  OSUINT32 recurrences;
666 } ASN1Interval;
667 
668 
673 typedef struct ASN1Time
674 {
679  OSUINT16 settings;
680 
681  union {
682  /* dateTime is use for abstract values that are only a date, a
683  time-of-day or a date and a time-of-day.*/
684  ASN1DateTime dateTime;
685 
686  /* interval is used for abstract values that are an interval.
687  If the interval has two points (start and end), they must use the same
688  settings.
689  The interval may be infinitely recurring (ASN1TIMEFIELD_RECUR_INF is
690  set in settings), finitely recurring (recurrences != 0), or
691  non-recurring (recurrences == 0).
692  The bit fields ASN1TIMEFIELD_DURATION, ASN1TIMEFIELD_INTERVAL_SD,
693  ASN1TIMEFIELD_INTERVAL_SE, and ASN1TIMEFIELD_INTERVAL_DE in settings are
694  used to distinguish the four possible cases.
695  */
696  ASN1Interval interval;
697  } val;
698 } ASN1Time;
699 
700 
725 EXTERNRT int rtMakeGeneralizedTime (OSCTXT* pctxt,
726  const OSNumDateTime* dateTime,
727  char** outdata,
728  size_t outdataSize);
729 
755 EXTERNRT int rtMakeTime(OSCTXT* pctxt,
756  const ASN1Time* timeVal,
757  char** outdata,
758  size_t outdataSize);
759 
760 
785 EXTERNRT int rtMakeUTCTime (OSCTXT* pctxt,
786  const OSNumDateTime* dateTime,
787  char** outdata,
788  size_t outdataSize);
808 EXTERNRT int rtParseGeneralizedTime (OSCTXT *pctxt,
809  const char* value,
810  OSNumDateTime* dateTime);
811 
829 EXTERNRT int rtParseGeneralizedTime2(OSCTXT *pctxt,
830  const char* value,
831  OSNumDateTime* dateTime,
832  OSBOOL logCanon);
833 
853 EXTERNRT int rtParseUTCTime (OSCTXT *pctxt,
854  const char* value,
855  OSNumDateTime* dateTime);
856 
874 EXTERNRT int rtParseUTCTime2(OSCTXT *pctxt,
875  const char* value,
876  OSNumDateTime* dateTime, OSBOOL logCanon);
877 
878 
893 EXTERNRT int rtParseTime(OSCTXT* pctxt, const char* value, ASN1Time* timeVal,
894  OSBOOL logCanon);
895 
896 
902 EXTERNRT void normalizeTimeZone(OSNumDateTime* pvalue);
903 
904 
909 /*
910  * SEQUENCE OF
911  */
916 typedef struct { /* generic sequence of structure */
918  OSUINT32 n;
919 
921  void* elem;
922 } ASN1SeqOf;
923 
929 typedef struct { /* sequence of OCTET STRING */
931  OSUINT32 n;
932 
934  OSDynOctStr* elem;
936 
941 typedef struct { /* generic open type data structure */
942  OSSIZE numocts;
943  const OSOCTET* data;
944 } ASN1OpenType;
945 
951 typedef struct { /* generic table constraint value holder */
952  ASN1OpenType encoded;
953  void* decoded;
954  OSINT32 index; /* table index */
955 } Asn1Object;
956 
957 typedef Asn1Object ASN1Object;
958 
963 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
964 typedef struct OSXSDAny {
965  OSXSDAnyAlt t;
966  union {
967  ASN1OpenType* binary;
968  const OSUTF8CHAR* xmlText;
969  } u;
970 } OSXSDAny;
971 
972 /* ASN.1 useful type definitions */
973 
979 typedef struct {
980  OSSIZE nchars;
981  OSUNICHAR* data;
983 
984 typedef OSUNICHAR ASN116BITCHAR;
985 
991 typedef struct {
992  OSSIZE nchars;
993  OS32BITCHAR* data;
995 
996 typedef const char* ASN1GeneralizedTime;
997 typedef const char* ASN1GeneralString;
998 typedef const char* ASN1GraphicString;
999 typedef const char* ASN1IA5String;
1000 typedef const char* ASN1ISO646String;
1001 typedef const char* ASN1NumericString;
1002 typedef const char* ASN1ObjectDescriptor;
1003 typedef const char* ASN1PrintableString;
1004 typedef const char* ASN1TeletexString;
1005 typedef const char* ASN1T61String;
1006 typedef const char* ASN1UTCTime;
1007 typedef const char* ASN1VideotexString;
1008 typedef const char* ASN1VisibleString;
1009 
1010 typedef const OSUTF8CHAR* ASN1UTF8String;
1013 
1014 /* ASN.1 constrained string structures */
1015 
1020 typedef struct {
1021  int nchars;
1022  char data[255];
1023 } Asn1CharArray;
1024 
1030 typedef struct {
1036 
1040  const char* canonicalSet;
1041 
1046 
1051 
1057 
1063 } Asn1CharSet;
1064 
1069 typedef struct {
1072 
1074  OSUINT16 firstChar, lastChar;
1075 
1077  unsigned unalignedBits;
1078 
1080  unsigned alignedBits;
1082 
1087 typedef struct {
1090 
1092  OSUINT32 firstChar, lastChar;
1093 
1095  unsigned unalignedBits;
1096 
1098  unsigned alignedBits;
1100 
1109 /* Helper functions. */
1110 
1123 EXTERNRT int rtValidateStr (ASN1TAG tag, const char *pdata);
1124 
1138 EXTERNRT int rtValidateChars (ASN1TAG tag, const char* pdata, size_t nchars);
1139 
1140 /* 16-bit character functions */
1141 
1152 EXTERNRT const char* rtBMPToCString (ASN1BMPString* pBMPString,
1153  char* cstring, OSSIZE cstrsize);
1154 
1165 EXTERNRT const char* rtBMPToNewCString (ASN1BMPString* pBMPString);
1166 
1180 EXTERNRT const char* rtBMPToNewCStringEx
1181  (OSCTXT *pctxt, ASN1BMPString* pBMPString);
1182 
1198 EXTERNRT ASN1BMPString* rtCToBMPString (OSCTXT* pctxt,
1199  const char* cstring,
1200  ASN1BMPString* pBMPString,
1201  Asn116BitCharSet* pCharSet);
1202 
1213 EXTERNRT OSBOOL rtIsIn16BitCharSet (OSUNICHAR ch,
1214  Asn116BitCharSet* pCharSet);
1215 
1216 /* 32-bit character (UCS-4) functions */
1217 
1218 
1230 EXTERNRT const char* rtUCSToCString (ASN1UniversalString* pUCSString,
1231  char* cstring, OSSIZE cstrsize);
1232 
1245 EXTERNRT const char* rtUCSToNewCString (ASN1UniversalString* pUCSString);
1246 
1261 EXTERNRT const char* rtUCSToNewCStringEx
1262 (OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1263 
1279 EXTERNRT ASN1UniversalString* rtCToUCSString
1280 (OSCTXT* pctxt, const char* cstring, ASN1UniversalString* pUCSString,
1281  Asn132BitCharSet* pCharSet);
1282 
1283 
1294 EXTERNRT OSBOOL rtIsIn32BitCharSet (OS32BITCHAR ch,
1295  Asn132BitCharSet* pCharSet);
1296 
1309 EXTERNRT wchar_t* rtUCSToWCSString (ASN1UniversalString* pUCSString,
1310  wchar_t* wcstring, OSUINT32 wcstrsize);
1311 
1312 
1330 EXTERNRT ASN1UniversalString* rtWCSToUCSString
1331 (OSCTXT* pctxt, wchar_t* wcstring,
1332  ASN1UniversalString* pUCSString, Asn132BitCharSet* pCharSet);
1333 
1345 EXTERNRT int rtUnivStrToUTF8
1346 (OSCTXT* pctxt, const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1347  size_t outbufsiz);
1348 
1363 EXTERNRT int rtUTF8StrToASN1DynBitStr
1364  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, ASN1DynBitStr* pvalue);
1365 
1382 EXTERNRT int rtUTF8StrnToASN1DynBitStr
1383  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, size_t nbytes,
1384  ASN1DynBitStr* pvalue);
1385 
1396 typedef struct ASN1BigInt {
1398  size_t numocts;
1399 
1401  OSOCTET* mag;
1402 
1404  int sign;
1405 
1407  size_t allocated;
1408 
1410  OSBOOL dynamic;
1411 } ASN1BigInt;
1412 
1414 #define ASN1_K_CCBMaskSize 32
1415 
1417 #define ASN1_K_NumBitsPerMask 16
1418 
1420 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask)
1421 
1429 typedef struct {
1431  OSOCTET* ptr;
1432 
1434  long len;
1435 
1437  int seqx;
1438 
1440  OSUINT16 mask[ASN1_K_CCBMaskSize];
1441 
1443  OSSIZE bytes;
1444 
1446  int stat;
1447 } ASN1CCB;
1448 
1450 typedef int (*ASN1DumpCbFunc) (const char* text_p, void* cbArg_p);
1451  // close the cruntime group. We reopen it later.
1453 
1454 /*
1455 I don't know why the following memory allocation macros are defined here. They
1456 seem to belong to the rtmem group, so I've designated that here.
1457 If we don't close the cruntime group first, the rtmem group will become a
1458 subgroup of the cruntime group.
1459 */
1460 
1477 #define ALLOC_ASN1ARRAY(pctxt,pseqof,type) do {\
1478 if (sizeof(type)*(pseqof)->n < (pseqof)->n) return RTERR_NOMEM; \
1479 if (((pseqof)->elem = (type*) rtxMemHeapAllocZ \
1480 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n)) == 0) return RTERR_NOMEM; \
1481 } while (0)
1482 
1495 #define ALLOC_ASN1ARRAY1(pctxt,pseqof,type) do {\
1496 if (sizeof(type)*(pseqof)->n < (pseqof)->n) (pseqof)->elem = 0; \
1497 else (pseqof)->elem = (type*) rtxMemHeapAllocZ \
1498 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n); \
1499 } while (0)
1500  //Reopen the cruntime group.
1509 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0)
1510 
1511 #ifdef __cplusplus
1512 }
1513 #endif
1514 
1515 #include "rtsrc/rtContext.h"
1516 #include "rtxsrc/rtxCommonDefs.h"
1517 #include "rtxsrc/rtxError.h"
1518 #include "rtxsrc/rtxMemory.h"
1519 
1524 #endif
OSOCTET * mag
Definition: asn1type.h:1401
int rtParseUTCTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
Definition: asn1type.h:1396
Definition: asn1type.h:630
OSOCTET * ptr
Definition: asn1type.h:1431
const char * canonicalSet
Definition: asn1type.h:1040
OSUINT32 numids
Definition: asn1type.h:277
int rtMakeGeneralizedTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:979
OSUINT32 numids
Definition: asn1type.h:287
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:471
OSSIZE bytes
Definition: asn1type.h:1443
Definition: asn1type.h:582
unsigned alignedBits
Definition: asn1type.h:1080
Definition: asn1type.h:941
Definition: asn1type.h:929
Definition: asn1type.h:1020
struct ASN1Time ASN1Time
Definition: asn1type.h:275
OSBOOL dynamic
Definition: asn1type.h:1410
ASN1StrType
Definition: asn1type.h:252
OSUINT32 firstChar
Definition: asn1type.h:1092
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:1095
OSUINT32 n
Definition: asn1type.h:931
struct ASN1IntervalSE ASN1IntervalSE
OSDynOctStr * elem
Definition: asn1type.h:934
Definition: asn1type.h:1030
ASN1UniversalString * rtCToUCSString(OSCTXT *pctxt, const char *cstring, ASN1UniversalString *pUCSString, Asn132BitCharSet *pCharSet)
Definition: asn1type.h:285
int rtUTF8StrToASN1DynBitStr(OSCTXT *pctxt, const OSUTF8CHAR *utf8str, ASN1DynBitStr *pvalue)
Asn132BitCharString charSet
Definition: asn1type.h:1089
void rtSetOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
OSUINT16 settings
Definition: asn1type.h:679
int rtMakeTime(OSCTXT *pctxt, const ASN1Time *timeVal, char **outdata, size_t outdataSize)
Definition: asn1type.h:639
OSUINT32 n
Definition: asn1type.h:918
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:1062
int seqx
Definition: asn1type.h:1437
Definition: asn1type.h:1069
int sign
Definition: asn1type.h:1404
struct ASN1IntervalSD ASN1IntervalSD
Definition: asn1type.h:657
int rtValidateStr(ASN1TAG tag, const char *pdata)
int canonicalSetSize
Definition: asn1type.h:1045
OSUINT16 firstChar
Definition: asn1type.h:1074
struct ASN1Duration ASN1Duration
Definition: asn1type.h:608
Definition: asn1type.h:1087
int rtRelOIDParseCompList(const char *str, OSSIZE strlen, ASN1OBJID *pvalue)
size_t allocated
Definition: asn1type.h:1407
unsigned alignedBits
Definition: asn1type.h:1098
int rtOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
const char * rtUCSToNewCString(ASN1UniversalString *pUCSString)
unsigned unalignedBits
Definition: asn1type.h:1077
Asn116BitCharString charSet
Definition: asn1type.h:1071
OSBOOL rtIsIn32BitCharSet(OS32BITCHAR ch, Asn132BitCharSet *pCharSet)
OSBOOL rtOIDIsValid(const ASN1OBJID *pvalue)
struct ASN1IntervalDE ASN1IntervalDE
Definition: asn1type.h:916
size_t numocts
Definition: asn1type.h:1398
int rtRelOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
Definition: asn1type.h:991
#define ASN1_K_CCBMaskSize
Definition: asn1type.h:1414
Definition: asn1type.h:465
int rtParseGeneralizedTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
void rtAddOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
unsigned charSetUnalignedBits
Definition: asn1type.h:1056
const char * rtBMPToCString(ASN1BMPString *pBMPString, char *cstring, OSSIZE cstrsize)
const char * rtBMPToNewCStringEx(OSCTXT *pctxt, ASN1BMPString *pBMPString)
Definition: asn1type.h:458
Definition: asn1type.h:673
Definition: asn1type.h:648
unsigned canonicalSetBits
Definition: asn1type.h:1050
Definition: asn1type.h:964
const char * rtBMPToNewCString(ASN1BMPString *pBMPString)
long len
Definition: asn1type.h:1434
struct ASN1Interval ASN1Interval
wchar_t * rtUCSToWCSString(ASN1UniversalString *pUCSString, wchar_t *wcstring, OSUINT32 wcstrsize)
int stat
Definition: asn1type.h:1446
int rtValidateChars(ASN1TAG tag, const char *pdata, size_t nchars)
Definition: rtxContext.h:198
Definition: asn1type.h:1429
OSBOOL rtOIDsEqual(const ASN1OBJID *pOID1, const ASN1OBJID *pOID2)
Definition: asn1type.h:951
int rtParseGeneralizedTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
void * elem
Definition: asn1type.h:921
const char * rtUCSToCString(ASN1UniversalString *pUCSString, char *cstring, OSSIZE cstrsize)
int(* ASN1DumpCbFunc)(const char *text_p, void *cbArg_p)
Definition: asn1type.h:1450
ASN1ActionType
Definition: asn1type.h:257
int rtMakeUTCTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:445
Asn1CharArray charSet
Definition: asn1type.h:1035
int rtOIDParseDottedNumberString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)