Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2020-06-06 07:27:53 +08:00
commit 5c4cee240f
30 changed files with 286 additions and 85 deletions

View file

@ -18,7 +18,8 @@ directory. This will contain relevant documentation regarding contributing,
using and distributing this code and its binaries.
If you are interested in the development and building side of things, some
information will be available on the [Pale Moon developer wiki](http://developer.palemoon.org).
information will be available on the [Pale Moon developer site](http://developer.palemoon.org).
You are also always welcome to get in touch with our community on the [Pale Moon forum](https://forum.palemoon.org/).
### A note about trademarks and branding

View file

@ -2463,9 +2463,9 @@ function losslessDecodeURI(aURI) {
}
// Encode invisible characters (C0/C1 control characters, U+007F [DEL],
// U+00A0 [no-break space], line and paragraph separator,
// object replacement character) (bug 452979, bug 909264)
value = value.replace(/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\ufffc]/g,
// U+00A0 [no-break space], line and paragraph separator, braille space
// object replacement character) (bug 452979, bug 909264, bug 1629506)
value = value.replace(/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\u2800\ufffc]/g,
encodeURIComponent);
// Encode default ignorable characters (bug 546013)

View file

@ -2298,9 +2298,9 @@ function losslessDecodeURI(aURI) {
}
// Encode invisible characters (C0/C1 control characters, U+007F [DEL],
// U+00A0 [no-break space], line and paragraph separator,
// U+00A0 [no-break space], line and paragraph separator, braille space,
// object replacement character) (bug 452979, bug 909264)
value = value.replace(/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\ufffc]/g,
value = value.replace(/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\u2800\ufffc]/g,
encodeURIComponent);
// Encode default ignorable characters (bug 546013)

View file

@ -1 +1 @@
28.9.4a1
28.10.1a1

View file

@ -5,6 +5,8 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/EMEUtils.h"
#include "jsfriendapi.h" // for AutoCheckCannotGC
#include "mozilla/dom/UnionTypes.h"
namespace mozilla {
@ -23,6 +25,7 @@ ArrayData
GetArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView)
{
MOZ_ASSERT(aBufferOrView.IsArrayBuffer() || aBufferOrView.IsArrayBufferView());
JS::AutoCheckCannotGC nogc;
if (aBufferOrView.IsArrayBuffer()) {
const dom::ArrayBuffer& buffer = aBufferOrView.GetAsArrayBuffer();
buffer.ComputeLengthAndData();
@ -39,6 +42,7 @@ void
CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView,
nsTArray<uint8_t>& aOutData)
{
JS::AutoCheckCannotGC nogc;
ArrayData data = GetArrayBufferViewOrArrayBufferData(aBufferOrView);
aOutData.Clear();
if (!data.IsValid()) {
@ -47,6 +51,14 @@ CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aB
aOutData.AppendElements(data.mData, data.mLength);
}
void CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBuffer& aBuffer,
nsTArray<uint8_t>& aOutData) {
JS::AutoCheckCannotGC nogc;
aBuffer.ComputeLengthAndData();
aOutData.Clear();
aOutData.AppendElements(aBuffer.Data(), aBuffer.Length());
}
bool
IsClearkeyKeySystem(const nsAString& aKeySystem)
{

View file

@ -11,6 +11,7 @@
#include "mozilla/Logging.h"
#include "nsString.h"
#include "nsTArray.h"
#include "mozilla/dom/TypedArray.h"
namespace mozilla {
@ -45,6 +46,10 @@ void
CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView,
nsTArray<uint8_t>& aOutData);
// Overload for ArrayBuffer
void CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBuffer& aBufferOrView,
nsTArray<uint8_t>& aOutData);
struct ArrayData {
explicit ArrayData(const uint8_t* aData, size_t aLength)
: mData(aData)

View file

@ -87,10 +87,10 @@ MediaEncryptedEvent::Constructor(const GlobalObject& aGlobal,
e->mInitDataType = aEventInitDict.mInitDataType;
if (!aEventInitDict.mInitData.IsNull()) {
const auto& a = aEventInitDict.mInitData.Value();
a.ComputeLengthAndData();
e->mInitData = ArrayBuffer::Create(aGlobal.Context(),
a.Length(),
a.Data());
nsTArray<uint8_t> initData;
CopyArrayBufferViewOrArrayBufferData(a, initData);
e->mInitData = ArrayBuffer::Create(aGlobal.Context(), initData.Length(),
initData.Elements());
if (!e->mInitData) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;

View file

@ -85,10 +85,11 @@ MediaKeyMessageEvent::Constructor(const GlobalObject& aGlobal,
RefPtr<MediaKeyMessageEvent> e = new MediaKeyMessageEvent(owner);
bool trusted = e->Init(owner);
e->InitEvent(aType, aEventInitDict.mBubbles, aEventInitDict.mCancelable);
aEventInitDict.mMessage.ComputeLengthAndData();
nsTArray<uint8_t> initData;
CopyArrayBufferViewOrArrayBufferData(aEventInitDict.mMessage, initData);
e->mMessage = ArrayBuffer::Create(aGlobal.Context(),
aEventInitDict.mMessage.Length(),
aEventInitDict.mMessage.Data());
initData.Length(),
initData.Elements());
if (!e->mMessage) {
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
return nullptr;

View file

@ -9,6 +9,7 @@
#include "ImageContainer.h"
#include "DecoderDoctorDiagnostics.h"
#include "ImageContainer.h"
#include "MediaDecoderReader.h"
#include "MediaInfo.h"
#include "mozilla/MozPromise.h"

View file

@ -779,7 +779,7 @@ struct JSClass {
// application.
#define JSCLASS_GLOBAL_APPLICATION_SLOTS 5
#define JSCLASS_GLOBAL_SLOT_COUNT \
(JSCLASS_GLOBAL_APPLICATION_SLOTS + JSProto_LIMIT * 2 + 45)
(JSCLASS_GLOBAL_APPLICATION_SLOTS + JSProto_LIMIT * 2 + 46)
#define JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(n) \
(JSCLASS_IS_GLOBAL | JSCLASS_HAS_RESERVED_SLOTS(JSCLASS_GLOBAL_SLOT_COUNT + (n)))
#define JSCLASS_GLOBAL_FLAGS \

View file

@ -1029,13 +1029,17 @@ JS_ResolveStandardClass(JSContext* cx, HandleObject obj, HandleId id, bool* reso
/* Check whether we're resolving 'undefined', and define it if so. */
JSAtom* idAtom = JSID_TO_ATOM(id);
JSAtom* undefinedAtom = cx->names().undefined;
if (idAtom == undefinedAtom) {
if (idAtom == cx->names().undefined) {
*resolved = true;
return DefineProperty(cx, global, id, UndefinedHandleValue, nullptr, nullptr,
JSPROP_PERMANENT | JSPROP_READONLY | JSPROP_RESOLVING);
}
// Resolve a "globalThis" self-referential property if necessary.
if (idAtom == cx->names().globalThis) {
return GlobalObject::maybeResolveGlobalThis(cx, global, resolved);
}
/* Try for class constructors/prototypes named by well-known atoms. */
stdnm = LookupStdName(cx->names(), idAtom, standard_class_names);
@ -1088,6 +1092,7 @@ JS_MayResolveStandardClass(const JSAtomState& names, jsid id, JSObject* maybeObj
// better, we need a JSContext here; it's fine as it is.)
return atom == names.undefined ||
atom == names.globalThis ||
LookupStdName(names, atom, standard_class_names) ||
LookupStdName(names, atom, builtin_property_names);
}

View file

@ -160,6 +160,7 @@
macro(getPropertyDescriptor, getPropertyDescriptor, "getPropertyDescriptor") \
macro(getPrototypeOf, getPrototypeOf, "getPrototypeOf") \
macro(global, global, "global") \
macro(globalThis, globalThis, "globalThis") \
macro(Handle, Handle, "Handle") \
macro(has, has, "has") \
macro(hasOwn, hasOwn, "hasOwn") \

View file

@ -296,6 +296,32 @@ GlobalObject::initBuiltinConstructor(JSContext* cx, Handle<GlobalObject*> global
return true;
}
// Resolve a "globalThis" self-referential property if necessary,
// per a stage-3 proposal. https://github.com/tc39/ecma262/pull/702
//
// We could also do this in |FinishObjectClassInit| to trim the global
// resolve hook. Unfortunately, |ToWindowProxyIfWindow| doesn't work then:
// the browser's |nsGlobalWindow::SetNewDocument| invokes Object init
// *before* it sets the global's WindowProxy using |js::SetWindowProxy|.
//
// Refactoring global object creation code to support this approach is a
// challenge for another day.
/* static */ bool
GlobalObject::maybeResolveGlobalThis(JSContext* cx, Handle<GlobalObject*> global, bool* resolved)
{
if (global->getSlot(GLOBAL_THIS_RESOLVED).isUndefined()) {
RootedValue v(cx, ObjectValue(*ToWindowProxyIfWindow(global)));
if (!DefineProperty(cx, global, cx->names().globalThis, v, nullptr, nullptr, JSPROP_RESOLVING)) {
return false;
}
*resolved = true;
global->setSlot(GLOBAL_THIS_RESOLVED, BooleanValue(true));
}
return true;
}
GlobalObject*
GlobalObject::createInternal(JSContext* cx, const Class* clasp)
{
@ -419,6 +445,12 @@ GlobalObject::initStandardClasses(JSContext* cx, Handle<GlobalObject*> global)
return false;
}
// Resolve a "globalThis" self-referential property if necessary.
bool resolved;
if (!GlobalObject::maybeResolveGlobalThis(cx, global, &resolved)) {
return false;
}
for (size_t k = 0; k < JSProto_LIMIT; ++k) {
if (!ensureConstructor(cx, global, static_cast<JSProtoKey>(k)))
return false;

View file

@ -121,6 +121,7 @@ class GlobalObject : public NativeObject
FOR_OF_PIC_CHAIN,
MODULE_RESOLVE_HOOK,
WINDOW_PROXY,
GLOBAL_THIS_RESOLVED,
/* Total reserved-slot count for global objects. */
RESERVED_SLOTS
@ -171,6 +172,8 @@ class GlobalObject : public NativeObject
static bool initBuiltinConstructor(JSContext* cx, Handle<GlobalObject*> global,
JSProtoKey key, HandleObject ctor, HandleObject proto);
static bool maybeResolveGlobalThis(JSContext* cx, Handle<GlobalObject*> global, bool* resolved);
void setConstructor(JSProtoKey key, const Value& v) {
MOZ_ASSERT(key <= JSProto_LIMIT);
setSlot(APPLICATION_SLOTS + key, v);

View file

@ -658,8 +658,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
// Get the border values
WritingMode outerWM = aReflowInput.GetWritingMode();
const LogicalMargin border(outerWM,
aReflowInput.mStyleBorder->GetComputedBorder());
const LogicalMargin border(outerWM, aDelegatingFrame->GetUsedBorder());
LogicalMargin margin =
kidReflowInput.ComputedLogicalMargin().ConvertTo(outerWM, wm);

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<title>Table Cell Testcase, bug 1379306</title>
<style>
table.collapse {
border-collapse: collapse;
}
td {
border: 20px solid #aaa;
width: 120px;
height: 150px;
}
.first {
background-color: #000;
position: absolute;
top: 20px;
left: 20px;
height: 10px;
width: 20px
}
</style>
<h1>Table Cell Testcase, bug 1379306</h1>
<div style="position: relative;">
<table class="collapse">
<tr>
<td>
<div class="first"></div>
</td>
</tr>
</table>
</div>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<title>Table Cell Testcase, bug 1379306</title>
<style>
table.collapse {
border-collapse: collapse;
}
td {
border: 20px solid #aaa;
width: 120px;
height: 150px;
position: relative;
}
div {
background-color: #000;
position: absolute;
top: 0;
left: 0;
height: 10px;
width: 20px
}
</style>
<h1>Table Cell Testcase, bug 1379306</h1>
<table class="collapse">
<tr>
<td>
<div></div>
</td>
</tr>
</table>

View file

@ -3,6 +3,7 @@
== bug1375518-3.html bug1375518-ref.html
== bug1375518-4.html bug1375518-4-ref.html
== bug1375518-5.html bug1375518-5-ref.html
== bug1379306.html bug1379306-ref.html
== bug1394226.html bug1394226-ref.html
!= bug1394226.html bug1394226-notref.html
== bc_dyn_cell1.html bc_dyn_cell1_ref.html

View file

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<title>Table Row Testcase, bug 1379306</title>
<style>
table { background: yellow }
td { height: 50px; width: 200px; background: aqua; }
div { background: fuchsia; height: 10px; width: 20px }
tr { position: relative; border: 30px solid blue; }
div { position: absolute; top: 0; left: 0 }
</style>
<h1>Table Row Testcase, bug 1379306</h1>
<table>
<tr>
<td>
<div></div>
</td>
</tr>
</table>

View file

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<title>Testcase, bug 1379306</title>
<style>
table { background: yellow }
td { height: 50px; width: 200px; background: aqua; }
div { background: fuchsia; height: 10px; width: 20px }
tr { position: relative; border: 10px solid blue }
div { position: absolute; top: 0; left: 0 }
</style>
<h1>Table Row Testcase, bug 1379306</h1>
<table>
<tr>
<td>
<div></div>
</td>
</tr>
</table>

View file

@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<title>Testcase, bug 1379306</title>
<style>
table { background: yellow }
td { height: 50px; width: 200px; background: aqua; }
div { background: fuchsia; height: 10px; width: 20px }
tbody { position: relative; border: 30px solid blue }
div { position: absolute; top: 0; left: 0 }
</style>
<h1>Table Row Group Testcase, bug 1379306</h1>
<table>
<tbody>
<tr>
<td>
<div></div>
</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<title>Testcase, bug 1379306</title>
<style>
table { background: yellow }
td { height: 50px; width: 200px; background: aqua; }
div { background: fuchsia; height: 10px; width: 20px }
tbody { position: relative; border: 10px solid blue }
div { position: absolute; top: 0; left: 0 }
</style>
<h1>Table Row Group Testcase, bug 1379306</h1>
<table>
<tbody>
<tr>
<td>
<div></div>
</td>
</tr>
</tbody>
</table>

View file

@ -1,2 +1,4 @@
== cell-align-stopped-at-table-1-standards.html cell-align-stopped-at-table-1-standards-ref.html
== cell-align-stopped-at-table-1-quirks.html cell-align-stopped-at-table-1-quirks-ref.html
== bug1379306-2.html bug1379306-2-ref.html
== bug1379306-3.html bug1379306-3-ref.html

View file

@ -360,10 +360,6 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
#endif
#endif
#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */
#endif
#ifndef __DECONST
#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
#endif
@ -1945,33 +1941,12 @@ pages_unmap(void *addr, size_t size)
}
}
#else
#ifdef JEMALLOC_USES_MAP_ALIGN
static void *
pages_map_align(size_t size, size_t alignment)
{
void *ret;
/*
* We don't use MAP_FIXED here, because it can cause the *replacement*
* of existing mappings, and we only want to create new mappings.
*/
ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
assert(ret != NULL);
if (ret == MAP_FAILED)
ret = NULL;
else
MozTagAnonymousMemory(ret, size, "jemalloc");
return (ret);
}
#endif
static void *
pages_map(void *addr, size_t size)
{
void *ret;
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
/*
* The JS engine assumes that all allocated pointers have their high 17 bits clear,
* which ia64's mmap doesn't support directly. However, we can emulate it by passing
@ -1992,7 +1967,7 @@ pages_map(void *addr, size_t size)
}
#endif
#if defined(__sparc__) && defined(__arch64__) && defined(__linux__)
#if defined(__sparc__) && defined(__arch64__) && defined(__linux__) || (defined(__sun) && defined(__x86_64__))
const uintptr_t start = 0x0000070000000000ULL;
const uintptr_t end = 0x0000800000000000ULL;
@ -2026,7 +2001,7 @@ pages_map(void *addr, size_t size)
if (ret == MAP_FAILED) {
ret = NULL;
}
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
/*
* If the allocated memory doesn't have its upper 17 bits clear, consider it
* as out of memory.
@ -2059,7 +2034,7 @@ pages_map(void *addr, size_t size)
MozTagAnonymousMemory(ret, size, "jemalloc");
}
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) || (defined(__sun) && defined(__x86_64__))
assert(ret == NULL || (!check_placement && ret != NULL)
|| (check_placement && ret == addr));
#else
@ -2310,9 +2285,6 @@ chunk_alloc_mmap_slow(size_t size, size_t alignment)
static void *
chunk_alloc_mmap(size_t size, size_t alignment)
{
#ifdef JEMALLOC_USES_MAP_ALIGN
return pages_map_align(size, alignment);
#else
void *ret;
size_t offset;
@ -2340,7 +2312,6 @@ chunk_alloc_mmap(size_t size, size_t alignment)
assert(ret != NULL);
return (ret);
#endif
}
bool
@ -5346,15 +5317,6 @@ MALLOC_OUT:
recycled_size = 0;
#ifdef JEMALLOC_USES_MAP_ALIGN
/*
* When using MAP_ALIGN, the alignment parameter must be a power of two
* multiple of the system pagesize, or mmap will fail.
*/
assert((chunksize % pagesize) == 0);
assert((1 << (ffs(chunksize / pagesize) - 1)) == (chunksize/pagesize));
#endif
/* Various sanity checks that regard configuration. */
assert(quantum >= sizeof(void *));
assert(quantum <= pagesize);

View file

@ -10,3 +10,4 @@
*/
#error "Do not include this header file."

View file

@ -313,13 +313,14 @@ DSA_NewKeyFromSeed(const PQGParams *params,
static SECStatus
dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest,
const unsigned char *kb)
const unsigned char *kbytes)
{
mp_int p, q, g; /* PQG parameters */
mp_int x, k; /* private key & pseudo-random integer */
mp_int r, s; /* tuple (r, s) is signature) */
mp_int t; /* holding tmp values */
mp_int ar; /* holding blinding values */
mp_digit fuzz; /* blinding multiplier for q */
mp_err err = MP_OKAY;
SECStatus rv = SECSuccess;
unsigned int dsa_subprime_len, dsa_signature_len, offset;
@ -373,6 +374,7 @@ dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest,
CHECK_MPI_OK(mp_init(&s));
CHECK_MPI_OK(mp_init(&t));
CHECK_MPI_OK(mp_init(&ar));
/*
** Convert stored PQG and private key into MPI integers.
*/
@ -380,14 +382,28 @@ dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest,
SECITEM_TO_MPINT(key->params.subPrime, &q);
SECITEM_TO_MPINT(key->params.base, &g);
SECITEM_TO_MPINT(key->privateValue, &x);
OCTETS_TO_MPINT(kb, &k, dsa_subprime_len);
OCTETS_TO_MPINT(kbytes, &k, dsa_subprime_len);
/* k blinding create a single value that has the high bit set in
* the mp_digit*/
if (RNG_GenerateGlobalRandomBytes(&fuzz, sizeof(mp_digit)) != SECSuccess) {
PORT_SetError(SEC_ERROR_NEED_RANDOM);
rv = SECFailure;
goto cleanup;
}
fuzz |= 1ULL << ((sizeof(mp_digit) * PR_BITS_PER_BYTE - 1));
/*
** FIPS 186-1, Section 5, Step 1
**
** r = (g**k mod p) mod q
*/
CHECK_MPI_OK(mp_exptmod(&g, &k, &p, &r)); /* r = g**k mod p */
CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */
CHECK_MPI_OK(mp_mul_d(&q, fuzz, &t)); /* t = q*fuzz */
CHECK_MPI_OK(mp_add(&k, &t, &t)); /* t = k+q*fuzz */
/* length of t is now fixed, bits in k have been blinded */
CHECK_MPI_OK(mp_exptmod(&g, &t, &p, &r)); /* r = g**t mod p */
/* r is now g**(k+q*fuzz) == g**k mod p */
CHECK_MPI_OK(mp_mod(&r, &q, &r)); /* r = r mod q */
/*
** FIPS 186-1, Section 5, Step 2
**
@ -411,15 +427,24 @@ dsa_SignDigest(DSAPrivateKey *key, SECItem *signature, const SECItem *digest,
/* Using mp_invmod on k directly would leak bits from k. */
CHECK_MPI_OK(mp_mul(&k, &ar, &k)); /* k = k * ar */
CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */
CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */
/* k is now k*t*ar */
CHECK_MPI_OK(mp_invmod(&k, &q, &k)); /* k = k**-1 mod q */
/* k is now (k*t*ar)**-1 */
CHECK_MPI_OK(mp_mulmod(&k, &t, &q, &k)); /* k = k * t mod q */
SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */
/* k is now (k*ar)**-1 */
SECITEM_TO_MPINT(localDigest, &s); /* s = HASH(M) */
/* To avoid leaking secret bits here the addition is blinded. */
CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */
CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */
CHECK_MPI_OK(mp_mul(&x, &ar, &x)); /* x = x * ar */
/* x is now x*ar */
CHECK_MPI_OK(mp_mulmod(&x, &r, &q, &x)); /* x = x * r mod q */
/* x is now x*r*ar */
CHECK_MPI_OK(mp_mulmod(&s, &ar, &q, &t)); /* t = s * ar mod q */
CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */
CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */
/* t is now hash(M)*ar */
CHECK_MPI_OK(mp_add(&t, &x, &s)); /* s = t + x */
/* s is now (HASH(M)+x*r)*ar */
CHECK_MPI_OK(mp_mulmod(&s, &k, &q, &s)); /* s = s * k mod q */
/* s is now (HASH(M)+x*r)*ar*(k*ar)**-1 = (k**-1)*(HASH(M)+x*r) */
/*
** verify r != 0 and s != 0
** mentioned as optional in FIPS 186-1.

View file

@ -22,10 +22,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
*/
#define NSS_VERSION "3.48" _NSS_CUSTOMIZED
#define NSS_VERSION "3.48.2" _NSS_CUSTOMIZED
#define NSS_VMAJOR 3
#define NSS_VMINOR 48
#define NSS_VPATCH 1
#define NSS_VPATCH 2
#define NSS_VBUILD 0
#define NSS_BETA PR_FALSE

View file

@ -17,10 +17,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
*/
#define SOFTOKEN_VERSION "3.48" SOFTOKEN_ECC_STRING
#define SOFTOKEN_VERSION "3.48.2" SOFTOKEN_ECC_STRING
#define SOFTOKEN_VMAJOR 3
#define SOFTOKEN_VMINOR 48
#define SOFTOKEN_VPATCH 1
#define SOFTOKEN_VPATCH 2
#define SOFTOKEN_VBUILD 0
#define SOFTOKEN_BETA PR_FALSE

View file

@ -19,10 +19,10 @@
* The format of the version string should be
* "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
*/
#define NSSUTIL_VERSION "3.48"
#define NSSUTIL_VERSION "3.48.2"
#define NSSUTIL_VMAJOR 3
#define NSSUTIL_VMINOR 48
#define NSSUTIL_VPATCH 1
#define NSSUTIL_VPATCH 2
#define NSSUTIL_VBUILD 0
#define NSSUTIL_BETA PR_FALSE

View file

@ -1168,14 +1168,14 @@ nsDataObj :: GetFileDescriptorInternetShortcutA ( FORMATETC& aFE, STGMEDIUM& aST
}
// get a valid filename in the following order: 1) from the page title,
// 2) localized string for an untitled page, 3) just use "Untitled.URL"
if (!CreateFilenameFromTextA(title, ".URL",
// 2) localized string for an untitled page, 3) just use "Untitled.url"
if (!CreateFilenameFromTextA(title, ".url",
fileGroupDescA->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
nsXPIDLString untitled;
if (!GetLocalizedString(u"noPageTitle", untitled) ||
!CreateFilenameFromTextA(untitled, ".URL",
!CreateFilenameFromTextA(untitled, ".url",
fileGroupDescA->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
strcpy(fileGroupDescA->fgd[0].cFileName, "Untitled.URL");
strcpy(fileGroupDescA->fgd[0].cFileName, "Untitled.url");
}
}
@ -1209,14 +1209,14 @@ nsDataObj :: GetFileDescriptorInternetShortcutW ( FORMATETC& aFE, STGMEDIUM& aST
}
// get a valid filename in the following order: 1) from the page title,
// 2) localized string for an untitled page, 3) just use "Untitled.URL"
if (!CreateFilenameFromTextW(title, L".URL",
// 2) localized string for an untitled page, 3) just use "Untitled.url"
if (!CreateFilenameFromTextW(title, L".url",
fileGroupDescW->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
nsXPIDLString untitled;
if (!GetLocalizedString(u"noPageTitle", untitled) ||
!CreateFilenameFromTextW(untitled, L".URL",
!CreateFilenameFromTextW(untitled, L".url",
fileGroupDescW->fgd[0].cFileName, NS_MAX_FILEDESCRIPTOR)) {
wcscpy(fileGroupDescW->fgd[0].cFileName, L"Untitled.URL");
wcscpy(fileGroupDescW->fgd[0].cFileName, L"Untitled.url");
}
}