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];
305 OSUINT64 subid[ASN_K_MAXSUBIDS];
310 #define EXTERN_C extern "C" 313 #define EXTERN_C extern 387 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
419 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
435 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
458 (
OSCTXT* pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize,
int enclen);
477 #define ASN1DynOctStr OSDynOctStr 478 #define ASN1DynOctStr64 OSDynOctStr64 510 #define OSSETBIT(bitStr,bitIndex) \ 511 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex) 519 #define OSSETBITP(pBitStr,bitIndex) \ 520 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 528 #define OSCLEARBIT(bitStr,bitIndex) \ 529 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex) 537 #define OSCLEARBITP(pBitStr,bitIndex) \ 538 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 548 #define OSTESTBIT(bitStr,bitIndex) \ 549 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex) 557 #define OSTESTBITP(pBitStr,bitIndex) \ 558 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 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 603 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \ 604 ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \ 605 ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \ 620 OSINT8 timezoneDifffHours;
621 OSUINT8 timezoneDiffMins;
691 OSUINT32 recurrences;
752 const OSNumDateTime* dateTime,
812 const OSNumDateTime* dateTime,
836 OSNumDateTime* dateTime);
857 OSNumDateTime* dateTime,
881 OSNumDateTime* dateTime);
902 OSNumDateTime* dateTime, OSBOOL logCanon);
989 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
994 const OSUTF8CHAR* xmlText;
1010 typedef OSUNICHAR ASN116BITCHAR;
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;
1036 typedef const OSUTF8CHAR* ASN1UTF8String;
1149 EXTERNRT
int rtValidateStr (ASN1TAG tag,
const char *pdata);
1164 EXTERNRT
int rtValidateChars (ASN1TAG tag,
const char* pdata,
size_t nchars);
1179 char* cstring, OSSIZE cstrsize);
1207 (
OSCTXT *pctxt, ASN1BMPString* pBMPString);
1225 const char* cstring,
1226 ASN1BMPString* pBMPString,
1256 EXTERNRT
const char*
rtUCSToCString (ASN1UniversalString* pUCSString,
1257 char* cstring, OSSIZE cstrsize);
1288 (
OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1306 (
OSCTXT* pctxt,
const char* cstring, ASN1UniversalString* pUCSString,
1336 wchar_t* wcstring, OSUINT32 wcstrsize);
1357 (
OSCTXT* pctxt,
wchar_t* wcstring,
1372 (
OSCTXT* pctxt,
const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1409 (
OSCTXT* pctxt,
const OSUTF8CHAR* utf8str,
size_t nbytes,
1440 #define ASN1_K_CCBMaskSize 32 1443 #define ASN1_K_NumBitsPerMask 16 1446 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask) 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; \ 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); \ 1535 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0) 1541 #include "rtsrc/rtContext.h" 1542 #include "rtxsrc/rtxCommonDefs.h" 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
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)