119 #if !defined(_MSC_VER) && !defined(__GNUC__) && !defined(_16BIT) && !defined(__SYMBIAN32__) 125 #include "rtxsrc/rtxExternDefs.h" 169 #include "rtsrc/asn1tag.h" 171 #include "rtsrc/rtExternDefs.h" 180 #define XM_ADVANCE 0x02 182 #define XM_DYNAMIC 0x04 186 #define XM_OPTIONAL 0x10 191 #define ASN_K_MAXDEPTH 32 193 #define ASN_K_MAXENUM 100 195 #define ASN_K_MAXERRP 5 197 #define ASN_K_MAXERRSTK 8 199 #ifndef ASN_K_ENCBUFSIZ 201 #define ASN_K_ENCBUFSIZ 16*1024 204 #ifndef ASN_K_MEMBUFSEG 206 #define ASN_K_MEMBUFSEG 1024 210 #define OSRTINDENTSPACES 3 215 #define ASN1_K_PLUS_INFINITY 0x40 218 #define ASN1_K_MINUS_INFINITY 0x41 221 #define ASN1_K_NOT_A_NUMBER 0x42 224 #define ASN1_K_MINUS_ZERO 0x43 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 240 #ifndef __SYMBIAN32__ 242 #define ASN1REALMAX (OSREAL)DBL_MAX 243 #define ASN1REALMIN (OSREAL)-DBL_MAX 246 typedef void* ASN1ANY;
270 #define ASN_K_MAXSUBIDS 128 279 OSUINT32 subid[ASN_K_MAXSUBIDS];
289 OSUINT64 subid[ASN_K_MAXSUBIDS];
294 #define EXTERN_C extern "C" 297 #define EXTERN_C extern 371 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
404 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
420 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
451 #define ASN1DynOctStr OSDynOctStr 452 #define ASN1DynOctStr64 OSDynOctStr64 484 #define OSSETBIT(bitStr,bitIndex) \ 485 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex) 493 #define OSSETBITP(pBitStr,bitIndex) \ 494 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 502 #define OSCLEARBIT(bitStr,bitIndex) \ 503 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex) 511 #define OSCLEARBITP(pBitStr,bitIndex) \ 512 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 522 #define OSTESTBIT(bitStr,bitIndex) \ 523 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex) 531 #define OSTESTBITP(pBitStr,bitIndex) \ 532 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 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 577 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \ 578 ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \ 579 ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \ 594 OSINT8 timezoneDifffHours;
595 OSUINT8 timezoneDiffMins;
665 OSUINT32 recurrences;
726 const OSNumDateTime* dateTime,
786 const OSNumDateTime* dateTime,
810 OSNumDateTime* dateTime);
831 OSNumDateTime* dateTime,
855 OSNumDateTime* dateTime);
876 OSNumDateTime* dateTime, OSBOOL logCanon);
963 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
968 const OSUTF8CHAR* xmlText;
984 typedef OSUNICHAR ASN116BITCHAR;
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;
1010 typedef const OSUTF8CHAR* ASN1UTF8String;
1123 EXTERNRT
int rtValidateStr (ASN1TAG tag,
const char *pdata);
1138 EXTERNRT
int rtValidateChars (ASN1TAG tag,
const char* pdata,
size_t nchars);
1153 char* cstring, OSSIZE cstrsize);
1181 (
OSCTXT *pctxt, ASN1BMPString* pBMPString);
1199 const char* cstring,
1200 ASN1BMPString* pBMPString,
1230 EXTERNRT
const char*
rtUCSToCString (ASN1UniversalString* pUCSString,
1231 char* cstring, OSSIZE cstrsize);
1262 (
OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1280 (
OSCTXT* pctxt,
const char* cstring, ASN1UniversalString* pUCSString,
1310 wchar_t* wcstring, OSUINT32 wcstrsize);
1331 (
OSCTXT* pctxt,
wchar_t* wcstring,
1346 (
OSCTXT* pctxt,
const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1383 (
OSCTXT* pctxt,
const OSUTF8CHAR* utf8str,
size_t nbytes,
1414 #define ASN1_K_CCBMaskSize 32 1417 #define ASN1_K_NumBitsPerMask 16 1420 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask) 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; \ 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); \ 1509 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0) 1515 #include "rtsrc/rtContext.h" 1516 #include "rtxsrc/rtxCommonDefs.h" 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
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:197
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)