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 356 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
371 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
387 (
const char* oidstr, OSSIZE oidstrlen,
ASN1OBJID* pvalue);
418 #define ASN1DynOctStr OSDynOctStr 419 #define ASN1DynOctStr64 OSDynOctStr64 451 #define OSSETBIT(bitStr,bitIndex) \ 452 rtxSetBit (bitStr.data, bitStr.numbits, bitIndex) 460 #define OSSETBITP(pBitStr,bitIndex) \ 461 rtxSetBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 469 #define OSCLEARBIT(bitStr,bitIndex) \ 470 rtxClearBit (bitStr.data, bitStr.numbits, bitIndex) 478 #define OSCLEARBITP(pBitStr,bitIndex) \ 479 rtxClearBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 489 #define OSTESTBIT(bitStr,bitIndex) \ 490 rtxTestBit (bitStr.data, bitStr.numbits, bitIndex) 498 #define OSTESTBITP(pBitStr,bitIndex) \ 499 rtxTestBit ((pBitStr)->data, (pBitStr)->numbits, bitIndex) 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 544 #define ASN1TIMEFIELD_POINT (ASN1TIMEFIELD_CENTURY | ASN1TIMEFIELD_YEAR | \ 545 ASN1TIMEFIELD_MONTH | ASN1TIMEFIELD_DAY | ASN1TIMEFIELD_WEEK | \ 546 ASN1TIMEFIELD_HOUR | ASN1TIMEFIELD_MIN | ASN1TIMEFIELD_SEC | \ 561 OSINT8 timezoneDifffHours;
562 OSUINT8 timezoneDiffMins;
632 OSUINT32 recurrences;
693 const OSNumDateTime* dateTime,
753 const OSNumDateTime* dateTime,
777 OSNumDateTime* dateTime);
798 OSNumDateTime* dateTime,
822 OSNumDateTime* dateTime);
843 OSNumDateTime* dateTime, OSBOOL logCanon);
930 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
935 const OSUTF8CHAR* xmlText;
951 typedef OSUNICHAR ASN116BITCHAR;
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;
977 typedef const OSUTF8CHAR* ASN1UTF8String;
1090 EXTERNRT
int rtValidateStr (ASN1TAG tag,
const char *pdata);
1105 EXTERNRT
int rtValidateChars (ASN1TAG tag,
const char* pdata,
size_t nchars);
1120 char* cstring, OSSIZE cstrsize);
1148 (
OSCTXT *pctxt, ASN1BMPString* pBMPString);
1166 const char* cstring,
1167 ASN1BMPString* pBMPString,
1197 EXTERNRT
const char*
rtUCSToCString (ASN1UniversalString* pUCSString,
1198 char* cstring, OSSIZE cstrsize);
1229 (
OSCTXT* pctxt, ASN1UniversalString* pUCSString);
1247 (
OSCTXT* pctxt,
const char* cstring, ASN1UniversalString* pUCSString,
1277 wchar_t* wcstring, OSUINT32 wcstrsize);
1298 (
OSCTXT* pctxt,
wchar_t* wcstring,
1313 (
OSCTXT* pctxt,
const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1350 (
OSCTXT* pctxt,
const OSUTF8CHAR* utf8str,
size_t nbytes,
1381 #define ASN1_K_CCBMaskSize 32 1384 #define ASN1_K_NumBitsPerMask 16 1387 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask) 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; \ 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); \ 1476 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0) 1482 #include "rtsrc/rtContext.h" 1483 #include "rtxsrc/rtxCommonDefs.h" 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
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)