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 359 EXTERNRT
int rtOIDAsn2Xml(
char* oidstr, OSSIZE oidlen, OSSIZE buflen,
434 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
466 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
482 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
505 (
OSCTXT* pctxt, OSUINT32 subidArray[], OSSIZE subidArraySize,
int enclen);
524 #define ASN1DynOctStr OSDynOctStr 525 #define ASN1DynOctStr64 OSDynOctStr64 557 #define OSSETBIT(bitStr,bitIndex) \ 558 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex) 566 #define OSSETBITP(pBitStr,bitIndex) \ 567 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 575 #define OSCLEARBIT(bitStr,bitIndex) \ 576 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex) 584 #define OSCLEARBITP(pBitStr,bitIndex) \ 585 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 595 #define OSTESTBIT(bitStr,bitIndex) \ 596 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex) 604 #define OSTESTBITP(pBitStr,bitIndex) \ 605 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 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 650 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \ 651 ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \ 652 ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \ 667 OSINT8 timezoneDifffHours;
668 OSUINT8 timezoneDiffMins;
738 OSUINT32 recurrences;
799 const OSNumDateTime* dateTime,
859 const OSNumDateTime* dateTime,
883 OSNumDateTime* dateTime);
904 OSNumDateTime* dateTime,
928 OSNumDateTime* dateTime);
949 OSNumDateTime* dateTime, OSBOOL logCanon);
1016 const OSOCTET* data;
1036 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
1041 const OSUTF8CHAR* xmlText;
1057 typedef OSUNICHAR ASN116BITCHAR;
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;
1083 typedef const OSUTF8CHAR* ASN1UTF8String;
1196 EXTERNRT
int rtValidateStr (ASN1TAG tag,
const char *pdata);
1211 EXTERNRT
int rtValidateChars (ASN1TAG tag,
const char* pdata,
size_t nchars);
1226 char* cstring, OSSIZE cstrsize);
1254 (
OSCTXT *pctxt, ASN1BMPString* pBMPString);
1272 const char* cstring,
1273 ASN1BMPString* pBMPString,
1303 EXTERNRT
const char*
rtUCSToCString (ASN1UniversalString* pUCSString,
1304 char* cstring, OSSIZE cstrsize);
1335 (
OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1353 (
OSCTXT* pctxt,
const char* cstring, ASN1UniversalString* pUCSString,
1383 wchar_t* wcstring, OSUINT32 wcstrsize);
1404 (
OSCTXT* pctxt,
wchar_t* wcstring,
1419 (
OSCTXT* pctxt,
const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1456 (
OSCTXT* pctxt,
const OSUTF8CHAR* utf8str,
size_t nbytes,
1487 #define ASN1_K_CCBMaskSize 32 1490 #define ASN1_K_NumBitsPerMask 16 1493 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask) 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; \ 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); \ 1582 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0) 1588 #include "rtsrc/rtContext.h" 1589 #include "rtxsrc/rtxCommonDefs.h" 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
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)