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) 535 const OSNumDateTime* dateTime,
564 const OSNumDateTime* dateTime,
584 OSNumDateTime* dateTime);
603 OSNumDateTime* dateTime);
670 typedef enum { OSXSDAny_binary, OSXSDAny_xmlText } OSXSDAnyAlt;
675 const OSUTF8CHAR* xmlText;
691 typedef OSUNICHAR ASN116BITCHAR;
703 typedef const char* ASN1GeneralizedTime;
704 typedef const char* ASN1GeneralString;
705 typedef const char* ASN1GraphicString;
706 typedef const char* ASN1IA5String;
707 typedef const char* ASN1ISO646String;
708 typedef const char* ASN1NumericString;
709 typedef const char* ASN1ObjectDescriptor;
710 typedef const char* ASN1PrintableString;
711 typedef const char* ASN1TeletexString;
712 typedef const char* ASN1T61String;
713 typedef const char* ASN1UTCTime;
714 typedef const char* ASN1VideotexString;
715 typedef const char* ASN1VisibleString;
717 typedef const OSUTF8CHAR* ASN1UTF8String;
845 EXTERNRT
int rtValidateChars (ASN1TAG tag,
const char* pdata,
size_t nchars);
860 char* cstring, OSSIZE cstrsize);
888 (
OSCTXT *pctxt, ASN1BMPString* pBMPString);
907 ASN1BMPString* pBMPString,
937 EXTERNRT
const char*
rtUCSToCString (ASN1UniversalString* pUCSString,
938 char* cstring, OSSIZE cstrsize);
969 (
OSCTXT* pctxt, ASN1UniversalString* pUCSString);
987 (
OSCTXT* pctxt,
const char* cstring, ASN1UniversalString* pUCSString,
1017 wchar_t* wcstring, OSUINT32 wcstrsize);
1038 (
OSCTXT* pctxt,
wchar_t* wcstring,
1053 (
OSCTXT* pctxt,
const ASN1UniversalString* pUnivStr, OSOCTET* outbuf,
1090 (
OSCTXT* pctxt,
const OSUTF8CHAR* utf8str,
size_t nbytes,
1121 #define ASN1_K_CCBMaskSize 32 1124 #define ASN1_K_NumBitsPerMask 16 1127 #define ASN1_K_MaxSetElements (ASN1_K_CCBMaskSize*ASN1_K_NumBitsPerMask) 1178 #define ALLOC_ASN1ARRAY(pctxt,pseqof,type) do {\ 1179 if (sizeof(type)*(pseqof)->n < (pseqof)->n) return RTERR_NOMEM; \ 1180 if (((pseqof)->elem = (type*) rtxMemHeapAllocZ \ 1181 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n)) == 0) return RTERR_NOMEM; \ 1196 #define ALLOC_ASN1ARRAY1(pctxt,pseqof,type) do {\ 1197 if (sizeof(type)*(pseqof)->n < (pseqof)->n) (pseqof)->elem = 0; \ 1198 else (pseqof)->elem = (type*) rtxMemHeapAllocZ \ 1199 (&(pctxt)->pMemHeap, sizeof(type)*(pseqof)->n); \ 1206 #define ASN1NUMOCTS(nbits) ((nbits>0)?(((nbits-1)/8)+1):0) 1212 #include "rtsrc/rtContext.h" 1213 #include "rtxsrc/rtxCommonDefs.h" OSOCTET * mag
Definition: asn1type.h:1108
Definition: asn1type.h:1103
OSOCTET * ptr
Definition: asn1type.h:1138
const char * canonicalSet
Definition: asn1type.h:747
OSUINT32 numids
Definition: asn1type.h:277
int rtMakeGeneralizedTime(OSCTXT *pctxt, const OSNumDateTime *dateTime, char **outdata, size_t outdataSize)
Definition: asn1type.h:686
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)
Definition: asn1type.h:438
OSSIZE bytes
Definition: asn1type.h:1150
unsigned alignedBits
Definition: asn1type.h:787
Definition: asn1type.h:648
Definition: asn1type.h:636
Definition: asn1type.h:727
Definition: asn1type.h:275
OSBOOL dynamic
Definition: asn1type.h:1117
ASN1StrType
Definition: asn1type.h:252
OSUINT32 firstChar
Definition: asn1type.h:799
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:802
OSUINT32 n
Definition: asn1type.h:638
OSDynOctStr * elem
Definition: asn1type.h:641
Definition: asn1type.h:737
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:796
void rtSetOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
OSUINT32 n
Definition: asn1type.h:625
ASN1BMPString * rtCToBMPString(OSCTXT *pctxt, const char *cstring, ASN1BMPString *pBMPString, Asn116BitCharSet *pCharSet)
unsigned charSetAlignedBits
Definition: asn1type.h:769
int seqx
Definition: asn1type.h:1144
Definition: asn1type.h:776
int sign
Definition: asn1type.h:1111
int rtValidateStr(ASN1TAG tag, const char *pdata)
int canonicalSetSize
Definition: asn1type.h:752
OSUINT16 firstChar
Definition: asn1type.h:781
Definition: asn1type.h:794
size_t allocated
Definition: asn1type.h:1114
unsigned alignedBits
Definition: asn1type.h:805
int rtOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
const char * rtUCSToNewCString(ASN1UniversalString *pUCSString)
unsigned unalignedBits
Definition: asn1type.h:784
Asn116BitCharString charSet
Definition: asn1type.h:778
OSBOOL rtIsIn32BitCharSet(OS32BITCHAR ch, Asn132BitCharSet *pCharSet)
OSBOOL rtOIDIsValid(const ASN1OBJID *pvalue)
Definition: asn1type.h:623
size_t numocts
Definition: asn1type.h:1105
int rtRelOIDParseString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)
Definition: asn1type.h:698
#define ASN1_K_CCBMaskSize
Definition: asn1type.h:1121
Definition: asn1type.h:432
int rtParseGeneralizedTime(OSCTXT *pctxt, const char *value, OSNumDateTime *dateTime)
void rtAddOID(ASN1OBJID *ptarget, ASN1OBJID *psource)
unsigned charSetUnalignedBits
Definition: asn1type.h:763
const char * rtBMPToCString(ASN1BMPString *pBMPString, char *cstring, OSSIZE cstrsize)
const char * rtBMPToNewCStringEx(OSCTXT *pctxt, ASN1BMPString *pBMPString)
Definition: asn1type.h:425
unsigned canonicalSetBits
Definition: asn1type.h:757
Definition: asn1type.h:671
const char * rtBMPToNewCString(ASN1BMPString *pBMPString)
long len
Definition: asn1type.h:1141
wchar_t * rtUCSToWCSString(ASN1UniversalString *pUCSString, wchar_t *wcstring, OSUINT32 wcstrsize)
int stat
Definition: asn1type.h:1153
int rtValidateChars(ASN1TAG tag, const char *pdata, size_t nchars)
Definition: rtxContext.h:185
Definition: asn1type.h:1136
OSBOOL rtOIDsEqual(const ASN1OBJID *pOID1, const ASN1OBJID *pOID2)
Definition: asn1type.h:658
void * elem
Definition: asn1type.h:628
const char * rtUCSToCString(ASN1UniversalString *pUCSString, char *cstring, OSSIZE cstrsize)
int(* ASN1DumpCbFunc)(const char *text_p, void *cbArg_p)
Definition: asn1type.h:1157
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:742
int rtOIDParseDottedNumberString(const char *oidstr, OSSIZE oidstrlen, ASN1OBJID *pvalue)