mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 04:17:31 +09:00
Change to ulwDecodePointer
This commit is contained in:
parent
bf743d6699
commit
60bc7b282e
1 changed files with 6 additions and 10 deletions
|
|
@ -12,14 +12,10 @@
|
||||||
/*
|
/*
|
||||||
* Windows NT4 / 2000 / XP‑RTM do not provide EncodePointer / DecodePointer.
|
* Windows NT4 / 2000 / XP‑RTM do not provide EncodePointer / DecodePointer.
|
||||||
* On down‑level systems, the correct behaviour is to return the pointer unchanged.
|
* On down‑level systems, the correct behaviour is to return the pointer unchanged.
|
||||||
|
* ulw = Ultra-Legacy Windows.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static __inline void* CompatDecodePointer(void* p)
|
static __inline void* ulwDecodePointer(void* p)
|
||||||
{
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline void* CompatEncodePointer(void* p)
|
|
||||||
{
|
{
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
@ -417,7 +413,7 @@ DecodeInline(void* dest,
|
||||||
}
|
}
|
||||||
|
|
||||||
static SECStatus
|
static SECStatus
|
||||||
CompatDecodePointer(void* dest,
|
ulwDecodePointer(void* dest,
|
||||||
const SEC_ASN1Template* templateEntry,
|
const SEC_ASN1Template* templateEntry,
|
||||||
SECItem* src, PLArenaPool* arena, PRBool checkTag)
|
SECItem* src, PLArenaPool* arena, PRBool checkTag)
|
||||||
{
|
{
|
||||||
|
|
@ -443,7 +439,7 @@ DecodeImplicit(void* dest,
|
||||||
SECItem* src, PLArenaPool* arena)
|
SECItem* src, PLArenaPool* arena)
|
||||||
{
|
{
|
||||||
if (templateEntry->kind & SEC_ASN1_POINTER) {
|
if (templateEntry->kind & SEC_ASN1_POINTER) {
|
||||||
return CompatDecodePointer((void*)((char*)dest),
|
return ulwDecodePointer((void*)((char*)dest),
|
||||||
templateEntry, src, arena, PR_FALSE);
|
templateEntry, src, arena, PR_FALSE);
|
||||||
} else {
|
} else {
|
||||||
return DecodeInline((void*)((char*)dest),
|
return DecodeInline((void*)((char*)dest),
|
||||||
|
|
@ -584,7 +580,7 @@ DecodeExplicit(void* dest,
|
||||||
|
|
||||||
if (SECSuccess == rv) {
|
if (SECSuccess == rv) {
|
||||||
if (templateEntry->kind & SEC_ASN1_POINTER) {
|
if (templateEntry->kind & SEC_ASN1_POINTER) {
|
||||||
rv = CompatDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE);
|
rv = ulwDecodePointer(dest, templateEntry, &subItem, arena, PR_TRUE);
|
||||||
} else {
|
} else {
|
||||||
rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE);
|
rv = DecodeInline(dest, templateEntry, &subItem, arena, PR_TRUE);
|
||||||
}
|
}
|
||||||
|
|
@ -711,7 +707,7 @@ DecodeItem(void* dest,
|
||||||
/* decode implicitly tagged components */
|
/* decode implicitly tagged components */
|
||||||
rv = DecodeImplicit(dest, templateEntry, &temp, arena);
|
rv = DecodeImplicit(dest, templateEntry, &temp, arena);
|
||||||
} else if (kind & SEC_ASN1_POINTER) {
|
} else if (kind & SEC_ASN1_POINTER) {
|
||||||
rv = CompatDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE);
|
rv = ulwDecodePointer(dest, templateEntry, &temp, arena, PR_TRUE);
|
||||||
} else if (kind & SEC_ASN1_CHOICE) {
|
} else if (kind & SEC_ASN1_CHOICE) {
|
||||||
rv = DecodeChoice(dest, templateEntry, &temp, arena);
|
rv = DecodeChoice(dest, templateEntry, &temp, arena);
|
||||||
} else if (kind & SEC_ASN1_ANY) {
|
} else if (kind & SEC_ASN1_ANY) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue