ASN1C C/C++ Common Runtime  ASN1C v7.4.x
asn1type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1997-2020 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 rtOIDParseString
356 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
357 
358 
370 EXTERNRT int rtRelOIDParseString
371 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
372 
386 EXTERNRT int rtOIDParseDottedNumberString
387 (const char* oidstr, OSSIZE oidstrlen, ASN1OBJID* pvalue);
388 
399 EXTERNRT OSBOOL rtOIDIsValid (const ASN1OBJID* pvalue);
400 
405 /*
406  * OCTET STRING
407  */
412 typedef struct {
413  OSUINT32 numocts;
414  OSOCTET data[1];
415 } ASN1OctStr;
416 
418 #define ASN1DynOctStr OSDynOctStr
419 #define ASN1DynOctStr64 OSDynOctStr64
420 
421 /*
422  * BIT STRING
423  */
425 typedef struct {
426  OSUINT32 numbits;
427  const OSOCTET* data;
428 } ASN1DynBitStr;
429 
432 typedef struct {
433  OSSIZE numbits;
434  const OSOCTET* data;
436 
438 typedef struct {
439  OSUINT32 numbits;
440  OSOCTET data[4];
441 } ASN1BitStr32;
442 
443 #include "rtxsrc/rtxBitString.h"
444 
451 #define OSSETBIT(bitStr,bitIndex) \
452 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex)
453 
460 #define OSSETBITP(pBitStr,bitIndex) \
461 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
462 
469 #define OSCLEARBIT(bitStr,bitIndex) \
470 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex)
471 
478 #define OSCLEARBITP(pBitStr,bitIndex) \
479 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
480 
489 #define OSTESTBIT(bitStr,bitIndex) \
490 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex)
491 
498 #define OSTESTBITP(pBitStr,bitIndex) \
499 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex)
500 
526 #define ASN1TIMEFIELD_CENTURY 0x01
527 #define ASN1TIMEFIELD_YEAR 0x02
528 #define ASN1TIMEFIELD_MONTH 0x04
529 #define ASN1TIMEFIELD_DAY 0x08
530 #define ASN1TIMEFIELD_WEEK 0x10
531 #define ASN1TIMEFIELD_HOUR 0x20
532 #define ASN1TIMEFIELD_MIN 0x40
533 #define ASN1TIMEFIELD_SEC 0x80
534 #define ASN1TIMEFIELD_Z 0x0100
535 #define ASN1TIMEFIELD_DIFF 0x0200
536 #define ASN1TIMEFIELD_INTERVAL_SE 0x0400
537 #define ASN1TIMEFIELD_DURATION 0x0800
538 #define ASN1TIMEFIELD_INTERVAL_SD 0x1000
539 #define ASN1TIMEFIELD_INTERVAL_DE 0x2000
540 #define ASN1TIMEFIELD_RECUR_INF 0x4000
541 
542 /* ASN1TIMEFIELD_POINT includes all the settings that would be set for a
543  point in time (date, time-of-day or both) except for timezone diff. */
544 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \
545  ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \
546  ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \
547  ASN1TIMEFIELD_Z)
548 
549 typedef struct ASN1DateTime
550 {
551  OSINT32 century;
552  OSINT32 year;
553  OSUINT8 month;
554  OSUINT8 week;
555  OSUINT8 day;
556  OSUINT8 hour;
557  OSUINT8 min;
558  OSUINT8 sec;
559  OSUINT8 fracDigits;
560  OSUINT32 fracValue;
561  OSINT8 timezoneDifffHours;
562  OSUINT8 timezoneDiffMins;
563 } ASN1DateTime;
564 
575 typedef struct ASN1Duration
576 {
577  OSUINT32 years;
578  OSUINT32 months;
579  OSUINT32 weeks;
580  OSUINT32 days;
581  OSUINT32 hours;
582  OSUINT32 mins;
583  OSUINT32 secs;
584  OSUINT8 fracDigits;
585  OSUINT32 fracValue;
586  OSUINT8 precision; /* 1 = years, 2 = months etc., in the order in which
587  the componentas appear above. This indicates which
588  is the last component present. If fracDigits != 0,
589  this tells you what component the fraction belongs to.
590  Fields which are more precise than indicated by precision
591  MUST be set to zero. */
592 } ASN1Duration;
593 
597 typedef struct ASN1IntervalDE
598 {
599  ASN1Duration duration;
600  ASN1DateTime end;
602 
606 typedef struct ASN1IntervalSE
607 {
608  ASN1DateTime start;
609  ASN1DateTime end;
611 
615 typedef struct ASN1IntervalSD
616 {
617  ASN1DateTime start;
618  ASN1Duration duration;
620 
624 typedef struct ASN1Interval
625 {
626  union {
627  ASN1Duration duration;
628  ASN1IntervalDE de;
629  ASN1IntervalSE se;
630  ASN1IntervalSD sd;
631  } spec;
632  OSUINT32 recurrences;
633 } ASN1Interval;
634 
635 
640 typedef struct ASN1Time
641 {
646  OSUINT16 settings;
647 
648  union {
649  /* dateTime is use for abstract values that are only a date, a
650  time-of-day or a date and a time-of-day.*/
651  ASN1DateTime dateTime;
652 
653  /* interval is used for abstract values that are an interval.
654  If the interval has two points (start and end), they must use the same
655  settings.
656  The interval may be infinitely recurring (ASN1TIMEFIELD_RECUR_INF is
657  set in settings), finitely recurring (recurrences != 0), or
658  non-recurring (recurrences == 0).
659  The bit fields ASN1TIMEFIELD_DURATION, ASN1TIMEFIELD_INTERVAL_SD,
660  ASN1TIMEFIELD_INTERVAL_SE, and ASN1TIMEFIELD_INTERVAL_DE in settings are
661  used to distinguish the four possible cases.
662  */
663  ASN1Interval interval;
664  } val;
665 } ASN1Time;
666 
667 
692 EXTERNRT int rtMakeGeneralizedTime (OSCTXT* pctxt,
693  const OSNumDateTime* dateTime,
694  char** outdata,
695  size_t outdataSize);
696 
722 EXTERNRT int rtMakeTime(OSCTXT* pctxt,
723  const ASN1Time* timeVal,
724  char** outdata,
725  size_t outdataSize);
726 
727 
752 EXTERNRT int rtMakeUTCTime (OSCTXT* pctxt,
753  const OSNumDateTime* dateTime,
754  char** outdata,
755  size_t outdataSize);
775 EXTERNRT int rtParseGeneralizedTime (OSCTXT *pctxt,
776  const char* value,
777  OSNumDateTime* dateTime);
778 
796 EXTERNRT int rtParseGeneralizedTime2(OSCTXT *pctxt,
797  const char* value,
798  OSNumDateTime* dateTime,
799  OSBOOL logCanon);
800 
820 EXTERNRT int rtParseUTCTime (OSCTXT *pctxt,
821  const char* value,
822  OSNumDateTime* dateTime);
823 
841 EXTERNRT int rtParseUTCTime2(OSCTXT *pctxt,
842  const char* value,
843  OSNumDateTime* dateTime, OSBOOL logCanon);
844 
845 
860 EXTERNRT int rtParseTime(OSCTXT* pctxt, const char* value, ASN1Time* timeVal,
861  OSBOOL logCanon);
862 
863 
869 EXTERNRT void normalizeTimeZone(OSNumDateTime* pvalue);
870 
871 
876 /*
877  * SEQUENCE OF
878  */
883 typedef struct { /* generic sequence of structure */
885  OSUINT32 n;
886 
888  void* elem;
889 } ASN1SeqOf;
890 
896 typedef struct { /* sequence of OCTET STRING */
898  OSUINT32 n;
899 
901  OSDynOctStr* elem;
903 
908 typedef struct { /* generic open type data structure */
909  OSSIZE numocts;
910  const OSOCTET* data;
911 } ASN1OpenType;
912 
918 typedef struct { /* generic table constraint value holder */
919  ASN1OpenType encoded;
920  void* decoded;
921  OSINT32 index; /* table index */
922 } Asn1Object;
923 
924 typedef Asn1Object ASN1Object;
925 
930 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
931 typedef struct OSXSDAny {
932  OSXSDAnyAlt t;
933  union {
934  ASN1OpenType* binary;
935  const OSUTF8CHAR* xmlText;
936  } u;
937 } OSXSDAny;
938 
939 /* ASN.1 useful type definitions */
940 
946 typedef struct {
947  OSSIZE nchars;
948  OSUNICHAR* data;
950 
951 typedef OSUNICHAR ASN116BITCHAR;
952 
958 typedef struct {
959  OSSIZE nchars;
960  OS32BITCHAR* data;
962 
963 typedef const char* ASN1GeneralizedTime;
964 typedef const char* ASN1GeneralString;
965 typedef const char* ASN1GraphicString;
966 typedef const char* ASN1IA5String;
967 typedef const char* ASN1ISO646String;
968 typedef const char* ASN1NumericString;
969 typedef const char* ASN1ObjectDescriptor;
970 typedef const char* ASN1PrintableString;
971 typedef const char* ASN1TeletexString;
972 typedef const char* ASN1T61String;
973 typedef const char* ASN1UTCTime;
974 typedef const char* ASN1VideotexString;
975 typedef const char* ASN1VisibleString;
976 
977 typedef const OSUTF8CHAR* ASN1UTF8String;
980 
981 /* ASN.1 constrained string structures */
982 
987 typedef struct {
988  int nchars;
989  char data[255];
990 } Asn1CharArray;
991 
997 typedef struct {
1003 
1007  const char* canonicalSet;
1008 
1013 
1018 
1024 
1030 } Asn1CharSet;
1031 
1036 typedef struct {
1039 
1041  OSUINT16 firstChar, lastChar;
1042 
1044  unsigned unalignedBits;
1045 
1047  unsigned alignedBits;
1049 
1054 typedef struct {
1057 
1059  OSUINT32 firstChar, lastChar;
1060 
1062  unsigned unalignedBits;
1063 
1065  unsigned alignedBits;
1067 
1076 /* Helper functions. */
1077 
1090 EXTERNRT int rtValidateStr (ASN1TAG tag, const char *pdata);
1091 
1105 EXTERNRT int rtValidateChars (ASN1TAG tag, const char* pdata, size_t nchars);
1106 
1107 /* 16-bit character functions */
1108 
1119 EXTERNRT const char* rtBMPToCString (ASN1BMPString* pBMPString,
1120  char* cstring, OSSIZE cstrsize);
1121 
1132 EXTERNRT const char* rtBMPToNewCString (ASN1BMPString* pBMPString);
1133 
1147 EXTERNRT const char* rtBMPToNewCStringEx
1148  (OSCTXT *pctxt, ASN1BMPString* pBMPString);
1149 
1165 EXTERNRT ASN1BMPString* rtCToBMPString (OSCTXT* pctxt,
1166  const char* cstring,
1167  ASN1BMPString* pBMPString,
1168  Asn116BitCharSet* pCharSet);
1169 
1180 EXTERNRT OSBOOL rtIsIn16BitCharSet (OSUNICHAR ch,
1181  Asn116BitCharSet* pCharSet);
1182 
1183 /* 32-bit character (UCS-4) functions */
1184 
1185 
1197 EXTERNRT const char* rtUCSToCString (ASN1UniversalString* pUCSString,
1198  char* cstring, OSSIZE cstrsize);
1199 
1212 EXTERNRT const char* rtUCSToNewCString (ASN1UniversalString* pUCSString);
1213 
1228 EXTERNRT const char* rtUCSToNewCStringEx
1229 (OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1230 
1246 EXTERNRT ASN1UniversalString* rtCToUCSString
1247 (OSCTXT* pctxt, const char* cstring, ASN1UniversalString* pUCSString,
1248  Asn132BitCharSet* pCharSet);
1249 
1250 
1261 EXTERNRT OSBOOL rtIsIn32BitCharSet (OS32BITCHAR ch,
1262  Asn132BitCharSet* pCharSet);
1263 
1276 EXTERNRT wchar_t* rtUCSToWCSString (ASN1UniversalString* pUCSString,
1277  wchar_t* wcstring, OSUINT32 wcstrsize);
1278 
1279 
1297 EXTERNRT ASN1UniversalString* rtWCSToUCSString
1298 (OSCTXT* pctxt, wchar_t* wcstring,
1299  ASN1UniversalString* pUCSString, Asn132BitCharSet* pCharSet);
1300 
1312 EXTERNRT int rtUnivStrToUTF8
1313 (OSCTXT* pctxt, const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1314  size_t outbufsiz);
1315 
1330 EXTERNRT int rtUTF8StrToASN1DynBitStr
1331  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, ASN1DynBitStr* pvalue);
1332 
1349 EXTERNRT int rtUTF8StrnToASN1DynBitStr
1350  (OSCTXT* pctxt, const OSUTF8CHAR* utf8str, size_t nbytes,
1351  ASN1DynBitStr* pvalue);
1352 
1363 typedef struct ASN1BigInt {
1365  size_t numocts;
1366 
1368  OSOCTET* mag;
1369 
1371  int sign;
1372 
1374  size_t allocated;
1375 
1377  OSBOOL dynamic;
1378 } ASN1BigInt;
1379 
1381 #define ASN1_K_CCBMaskSize 32
1382 
1384 #define ASN1_K_NumBitsPerMask 16
1385 
1387 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask)
1388 
1396 typedef struct {
1398  OSOCTET* ptr;
1399 
1401  long len;
1402 
1404  int seqx;
1405 
1407  OSUINT16 mask[ASN1_K_CCBMaskSize];
1408 
1410  OSSIZE bytes;
1411 
1413  int stat;
1414 } ASN1CCB;
1415 
1417 typedef int (*ASN1DumpCbFunc) (const char* text_p, void* cbArg_p);
1418  // close the cruntime group. We reopen it later.
1420 
1421 /*
1422 I don't know why the following memory allocation macros are defined here. They
1423 seem to belong to the rtmem group, so I've designated that here.
1424 If we don't close the cruntime group first, the rtmem group will become a
1425 subgroup of the cruntime group.
1426 */
1427 
1444 #define ALLOC_ASN1ARRAY(pctxt,pseqof,type) do {\
1445 if (sizeof(type)*(pseqof)->n < (pseqof)->n) return RTERR_NOMEM; \
1446 if (((pseqof)->elem = (type*) rtxMemHeapAllocZ \
1447 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n)) == 0) return RTERR_NOMEM; \
1448 } while (0)
1449 
1462 #define ALLOC_ASN1ARRAY1(pctxt,pseqof,type) do {\
1463 if (sizeof(type)*(pseqof)->n < (pseqof)->n) (pseqof)->elem = 0; \
1464 else (pseqof)->elem = (type*) rtxMemHeapAllocZ \
1465 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n); \
1466 } while (0)
1467  //Reopen the cruntime group.
1476 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0)
1477 
1478 #ifdef __cplusplus
1479 }
1480 #endif
1481 
1482 #include "rtsrc/rtContext.h"
1483 #include "rtxsrc/rtxCommonDefs.h"
1484 #include "rtxsrc/rtxError.h"
1485 #include "rtxsrc/rtxMemory.h"
1486 
1491 #endif
OSOCTET * mag
Definition: asn1type.h:1368
int rtParseUTCTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
Definition: asn1type.h:1363
Definition: asn1type.h:597
OSOCTET * ptr
Definition: asn1type.h:1398
const char * canonicalSet
Definition: asn1type.h:1007
OSUINT32 numids
Definition: asn1type.h:277
int rtMakeGeneralizedTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:946
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:438
OSSIZE bytes
Definition: asn1type.h:1410
Definition: asn1type.h:549
unsigned alignedBits
Definition: asn1type.h:1047
Definition: asn1type.h:908
Definition: asn1type.h:896
Definition: asn1type.h:987
struct ASN1Time ASN1Time
Definition: asn1type.h:275
OSBOOL dynamic
Definition: asn1type.h:1377
ASN1StrType
Definition: asn1type.h:252
OSUINT32 firstChar
Definition: asn1type.h:1059
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:1062
OSUINT32 n
Definition: asn1type.h:898
struct ASN1IntervalSE ASN1IntervalSE
OSDynOctStr * elem
Definition: asn1type.h:901
Definition: asn1type.h:997
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:1056
void rtSetOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
OSUINT16 settings
Definition: asn1type.h:646
int rtMakeTime(OSCTXT *pctxt, const ASN1Time *timeVal, char **outdata, size_t outdataSize)
Definition: asn1type.h:606
OSUINT32 n
Definition: asn1type.h:885
ASN1BMPString * rtCToBMPString(OSCTXT *pctxt, const char *cstring, ASN1BMPString *pBMPString, Asn116BitCharSet *pCharSet)
unsigned charSetAlignedBits
Definition: asn1type.h:1029
int seqx
Definition: asn1type.h:1404
Definition: asn1type.h:1036
int sign
Definition: asn1type.h:1371
struct ASN1IntervalSD ASN1IntervalSD
Definition: asn1type.h:624
int rtValidateStr(ASN1TAG tag, const char *pdata)
int canonicalSetSize
Definition: asn1type.h:1012
OSUINT16 firstChar
Definition: asn1type.h:1041
struct ASN1Duration ASN1Duration
Definition: asn1type.h:575
Definition: asn1type.h:1054
size_t allocated
Definition: asn1type.h:1374
unsigned alignedBits
Definition: asn1type.h:1065
int rtOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
const char * rtUCSToNewCString(ASN1UniversalString *pUCSString)
unsigned unalignedBits
Definition: asn1type.h:1044
Asn116BitCharString charSet
Definition: asn1type.h:1038
OSBOOL rtIsIn32BitCharSet(OS32BITCHAR ch, Asn132BitCharSet *pCharSet)
OSBOOL rtOIDIsValid(const ASN1OBJID *pvalue)
struct ASN1IntervalDE ASN1IntervalDE
Definition: asn1type.h:883
size_t numocts
Definition: asn1type.h:1365
int rtRelOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
Definition: asn1type.h:958
#define ASN1_K_CCBMaskSize
Definition: asn1type.h:1381
Definition: asn1type.h:432
int rtParseGeneralizedTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
void rtAddOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
unsigned charSetUnalignedBits
Definition: asn1type.h:1023
const char * rtBMPToCString(ASN1BMPString *pBMPString, char *cstring, OSSIZE cstrsize)
const char * rtBMPToNewCStringEx(OSCTXT *pctxt, ASN1BMPString *pBMPString)
Definition: asn1type.h:425
Definition: asn1type.h:640
Definition: asn1type.h:615
unsigned canonicalSetBits
Definition: asn1type.h:1017
Definition: asn1type.h:931
const char * rtBMPToNewCString(ASN1BMPString *pBMPString)
long len
Definition: asn1type.h:1401
struct ASN1Interval ASN1Interval
wchar_t * rtUCSToWCSString(ASN1UniversalString *pUCSString, wchar_t *wcstring, OSUINT32 wcstrsize)
int stat
Definition: asn1type.h:1413
int rtValidateChars(ASN1TAG tag, const char *pdata, size_t nchars)
Definition: rtxContext.h:189
Definition: asn1type.h:1396
OSBOOL rtOIDsEqual(const ASN1OBJID *pOID1, const ASN1OBJID *pOID2)
Definition: asn1type.h:918
int rtParseGeneralizedTime2(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime, OSBOOL logCanon)
void * elem
Definition: asn1type.h:888
const char * rtUCSToCString(ASN1UniversalString *pUCSString, char *cstring, OSSIZE cstrsize)
int(* ASN1DumpCbFunc)(const char *text_p, void *cbArg_p)
Definition: asn1type.h:1417
ASN1ActionType
Definition: asn1type.h:257
int rtMakeUTCTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:412
Asn1CharArray charSet
Definition: asn1type.h:1002
int rtOIDParseDottedNumberString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)