Search completed in 1.38 seconds.
48 results for "retry":
Your results are loading. Please wait...
PaymentResponse.retry() - Web APIs
The PaymentResponse interface's retry() method makes it possible to ask the user to retry a payment after an error occurs during processing. This lets your app gracefully deal with situations such as invalid shipping addresses or declined credit cards. Syntax retryPromise = paymentRequest.retry(errorFields); Parameters errorFields A PaymentValidationErrors object, with the following properties: error Optional A general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information. error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while other properties' values gude the user to errors in spe...
... any of the fields in the shipping address that failed validation. Return value A Promise which is resolved when the payment is successfully completed. The promise is rejected with an appropriate exception value if the payment fails again. Typically you will use this by calling show(), then entering a loop or recursive function that checks the PaymentResponse for errors or other reasons to retry the payment request. If a retry is needed, the loop calls retry(), then loops back to check the response when it comes in. The loop exits only when the user either cancels the payment request or the request is successful. See the example below for a thorough example, but the basic concept, in outline form, is: Create a new PaymentRequest (new PaymentRequest()) Display the payment request (Pa...
...eptions for show() for further details. Call complete("fail") to close the payment request. async function handlePayment() { const payRequest = new PaymentRequest(methodData, details, options); try { let payResponse = await payRequest.show(); while (payResponse has errors) { /* let the user edit the payment information, wait until they submit */ await response.retry(); } await payResponse.complete("success"); } catch(err) { /* handle the exception */ } } Examples try { await paymentRequest.retry(errorFields); } catch (DOMException err) { ... } async function doPaymentRequest() { const request = new PaymentRequest(methodData, details, options); const response = await request.show(); await recursiveValidate(request, response); await...
...And 2 more matches
Retry-After - HTTP
The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used: When sent with a 503 (Service Unavailable) response, this indicates how long the service is expected to be unavailable. When sent with a 429 (Too Many Requests) response, this indicates how long to wait before making a new request. When sent with a redirect response, such as 301 (Moved Permanently), this indicates the minimum time that the user agent is asked to wait before issuing the redirected request. Header type Response header Forbidden header name no Syntax Retry-After: <http-date> Retry-After: <delay-seconds> Directives <http-date> A date after which to retry. See the Date heade...
... Forbidden header name no Syntax Retry-After: <http-date> Retry-After: <delay-seconds> Directives <http-date> A date after which to retry. See the Date header for more details on the HTTP date format. <delay-seconds> A non-negative decimal integer indicating the seconds to delay after the response is received. Examples Dealing with scheduled downtime Support for the Retry-After header on both clients and servers is still inconsistent. However, some crawlers and spiders, like the Googlebot, honor the Retry-After header. It is useful to send it along with a 503 (Service Unavailable) response, so that search engines will keep indexing your site when the downtime is over. ...
...ter the response is received. Examples Dealing with scheduled downtime Support for the Retry-After header on both clients and servers is still inconsistent. However, some crawlers and spiders, like the Googlebot, honor the Retry-After header. It is useful to send it along with a 503 (Service Unavailable) response, so that search engines will keep indexing your site when the downtime is over. ...
...And 2 more matches
Utilities for nss samples
is not a feasible option. * * This function supports password extraction from files with * multipe passwords, one for each token. ...
...n. ...
... in the commnd line is not a feasible option. * * This function supports password extraction from files with * multipe passwords, one for each token. ...
...And 3 more matches
NSS Sample Code Utilities_1
n the command line is not a feasible option. * * This function supports password extraction from files with * multiple passwords, one for each token. ...
...d variant they could be of the form * * token_1_name:its_password * token_2_name:its_password * */ char *FilePasswd(PK11SlotInfo *slot, PRBool retry, void *arg) { char* phrases, *phrase; PRFileDesc *fd; PRInt32 nb; char *pwFile = arg; int i; const long maxPwdFileSize = 4096; char* tokenName = NULL; int tokenLen = 0; if (!pwFile) return 0; if (retry) { return 0; /* no good retrying - the file contents will be the same */ } phrases = PORT_ZAlloc(maxPwdFileSize); if (!phrases) { return 0; /* out of memory */ } fd = PR_Open(pwFile, PR_RDONLY, 0); if (!fd) { fprintf(stderr, "No password file \"%s\" exists.\n", pwFile); PORT_Free(phrases); return NULL; } nb = PR_Read(fd,...
... while (phrases[i] != '\r' && phrases[i] != '\n' && i < nb) i++; /* terminate passphrase */ phrases[i++] = '\0'; /* clean up any EOL before the start of the next passphrase */ while ( (i<nb) analyze="" char="" current="" getmodulepassword="" if="" int="" now="" passphrase="" phrase="&amp;phrases[startphrase];" phraselen="" pk11slotinfo="" pwdata="=" pwdata-="" retry="" return="" secupwdata="" the="" void="" while="">source != PW_NONE) { PR_fprintf(PR_STDERR, "Incorrect password/PIN entered.\n"); return NULL; } switch (pwdata->source) { case PW_NONE: sprintf(prompt, "Enter Password or Pin for \"%s\":", PK11_GetTokenName(slot)); return GetPassword(stdin, stdout, prompt, CheckPassword); case PW_FR...
...d="" while="">source != PW_NONE) { PR_fprintf(PR_STDERR, "Incorrect password/PIN entered.\n"); return NULL; } switch (pwdata->source) { case PW_NONE: sprintf(prompt, "Enter Password or Pin for \"%s\":", PK11_GetTokenName(slot)); return GetPassword(stdin, stdout, prompt, CheckPassword); case PW_FROMFILE: pw = FilePasswd(slot, retry, pwdata->data); pwdata->source = PW_PLAINTEXT; pwdata->data = PL_strdup(pw); return pw; case PW_PLAINTEXT: return PL_strdup(pwdata->data); default: break; } PR_fprintf(PR_STDERR, "Password check failed: No password found.\n"); return NULL; } /* * GenerateRandom */ SECStatus GenerateRandom(unsigned char *rbuf, int rsize) { char met...
Index - Web APIs
Web › API › Index
ct passed to the PaymentRequest constructor. 2964 PaymentResponse.requestId API, Experimental, Payment Request, Payment Request API, PaymentResponse, Property, Secure context, requestId The requestId read-only property of the PaymentResponse interface rreturns the free-form identifier supplied by the PaymentResponse() constructor by details.id. 2965 PaymentResponse.retry() API, Commerce, Method, Payment Request, Payment Request API, PaymentResponse, Reference, Web Payments, payment, retry The PaymentResponse interface's reply() method makes it possible to ask the user to retry a payment after an error occurs during processing. 2966 PaymentResponse.shippingAddress API, Experimental, Payment Request, Payment Request API, PaymentResponse, Pr...
...ionErrors API, Commerce, Dictionary, Errors, Payment Request, Payment Request API, PaymentValidationErrors, Reference, Validation, payment The PaymentValidationErrors dictionary represents objects providing information about any and all errors that occurred while processing a payment request. When validation of the PaymentResponse returned by the PaymentRequest.show() or PaymentResponse.retry() methods fails, your code creates a PaymentValidationErrors object to pass into retry() so that the user agent knows what needs to be fixed and what if any error messages to display to the user. 2970 Pbkdf2Params API, Dictionary, Pbkdf2Params, Reference, Web Crypto API The Pbkdf2Params dictionary of the Web Crypto API represents the object that should be passed as the algori...
...ect. 3041 PerformanceResourceTiming.requestStart API, Property, Reference, Web Performance The requestStart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retires the request, the value returned will be the start of the retry request. 3042 PerformanceResourceTiming.responseEnd API, Property, Reference, Web Performance The responseEnd read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first. 3043 PerformanceResourceTiming.responseStart API, Property, Refe...
NSS 3.35 release notes
d against previous versions of TLS will now refer to an unsupported codepoint, if this value was used. Recompilation should correct any mismatches. Note: DTLS support is promoted in draft -23, but this is currently not compliant with the DTLS 1.3 draft -23 specification. TLS servers are able to handle a ClientHello statelessly, if the client supports TLS 1.3. If the server sends a HelloRetryRequest, it is possible to discard the server socket, and make a new socket to handle any subsequent ClientHello. This better enables stateless server operation. (This feature is added in support of QUIC, but it also has utility for DTLS 1.3 servers.) The tstclnt utility now supports DTLS, using the -P option. Note that a DTLS server is also provided in tstclnt. TLS compression is no longer p...
...pplication-chosen content. An anti-replay mechanism was added for 0-RTT, through the experimental SSL_SetupAntiReplay function. This mechanism must be enabled for 0-RTT to be accepted when NSS is being used as a server. KeyUpdate can be triggered by the experimental SSL_KeyUpdate() function. TLS servers can screen new TLS 1.3 connections, as they are made using the experimental SSL_HelloRetryRequestCallback function. This function allows for callbacks to be installed, which are called when a server receives a new TLS ClientHello. The application is then able to examine application-chosen content from the session tickets, or HelloRetryRequest cookie, and decide whether to proceed with the connection. For an initial ClientHello, an application can control whether NSS sends a HelloRet...
NSS Sample Code sample4
include "nss.h" #include "pk11pub.h" /* this callback is responsible for returning the password to the NSS * key database. for example purposes, this function hardcodes the password. ...
...err, "Result of decryption, outlen = %d\n", outlen); fprintf(stderr, "Result of decryption, buf = \n%s\n", buf1); exit(0); cleanup: if (cert) CERT_DestroyCertificate(cert); if (pubkey) SECKEY_DestroyPublicKey(pubkey); if (pvtkey) SECKEY_DestroyPrivateKey(pvtkey); if (buf1) free(buf1); if (buf2) free(buf2); exit(1); } char *passwdcb(PK11SlotInfo *info, PRBool retry, void *arg) { if (!retry) return PL_strdup("test"); else return NULL; } ...
NSS Sample Code sample6
an * integer */ void genkey(int id); /* this callback is responsible for returning the password to the NSS * key database. for example purposes, this function hardcodes the password. * In a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(PK11SlotInfo *info, PRBool retry, void *arg); int main(int argc, char **argv) { SECStatus rv; /* Initialize NSS */ PK11_SetPasswordFunc(passwdcb); /* The NSS db must be initialized read-write since we'll be creating * keys in it. Once keys are generated, it can be opened without read-write * subsequently (NSS_Init). */ rv = NSS_InitReadWrite("."); if (rv != SECSuccess) { fprintf(stderr, "NSS initia...
... PR_GetError()); PK11_FreeSlot(slot); return; } fprintf(stderr, "Found key!\n"); fprintf(stderr, "key length of generated key is %d\n", PK11_GetKeyLength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", PK11_GetMechanism(key), cipherMech); PK11_FreeSymKey(key); PK11_FreeSlot(slot); } char *passwdcb(PK11SlotInfo *info, PRBool retry, void *arg) { if (!retry) return PL_strdup("test"); else return NULL; } ...
NSS PKCS11 Functions
a private key. Such information is protected with a password that can be retrieved by calling an application-supplied callback function. The callback function is identified in a call to PK11_SetPasswordFunc that takes place during NSS initialization. The callback function set up by PK11_SetPasswordFunc has the following prototype: typedef char *(*PK11PasswordFunc)( PK11SlotInfo *slot, PRBool retry, void *arg); This callback function has the following parameters: slot A pointer to a slot info structure. retry Set to PR_TRUE if this is a retry. This implies that the callback has previously returned the wrong password. arg A pointer supplied by the application that can be used to pass state information. Can be NULL. This callback function returns one of these values: If successful, a poin...
...ation that can be used to pass state information. Can be NULL. This callback function returns one of these values: If successful, a pointer to the password. This memory must have been allocated with PR_Malloc or PL_strdup. If unsuccessful, returns NULL. Many tokens keep track of the number of attempts to enter a password and do not allow further attempts after a certain point. Therefore, if the retry argument is PR_TRUE, indicating that the password was tried and is wrong, the callback function should return NULL to indicate that it is unsuccessful, rather than attempting to return the same password again. Failing to terminate when the retry argument is PR_TRUE can result in an endless loop. Several functions in the NSS libraries use the password callback function to obtain the password befor...
pkfnc.html
private key. Such information is protected with a password that can be retrieved by calling an application-supplied callback function. The callback function is identified in a call to PK11_SetPasswordFunc that takes place during NSS initialization. The callback function set up by PK11_SetPasswordFunc has the following prototype: typedef char *(*PK11PasswordFunc)( PK11SlotInfo *slot, PRBool retry, void *arg); This callback function has the following parameters: slot A pointer to a slot info structure. retry Set to PR_TRUE if this is a retry. This implies that the callback has previously returned the wrong password. arg A pointe...
... pass state information. Can be NULL. This callback function returns one of these values: If successful, a pointer to the password. This memory must have been allocated with PR_Malloc or PL_strdup. If unsuccessful, returns NULL. Many tokens keep track of the number of attempts to enter a password and do not allow further attempts after a certain point. Therefore, if the retry argument is PR_TRUE, indicating that the password was tried and is wrong, the callback function should return NULL to indicate that it is unsuccessful, rather than attempting to return the same password again. Failing to terminate when the retry argument is PR_TRUE can result in an endless loop. Several functions in the NSS libraries use the password callback function to obtain the password befo...
sslerr.html
ERTIFICATE -8181 Peer's certificate has expired. SEC_ERROR_REVOKED_CERTIFICATE -8180 Peer's certificate has been revoked. SEC_ERROR_UNKNOWN_ISSUER -8179 Peer's certificate issuer is not recognized. SEC_ERROR_BAD_KEY -8178 Peer's public key is invalid SEC_ERROR_BAD_PASSWORD -8177 The password entered is incorrect. SEC_ERROR_RETRY_PASSWORD -8176 New password entered incorrectly. SEC_ERROR_NO_NODELOCK -8175 Security library: no nodelock. SEC_ERROR_BAD_DATABASE -8174 Security library: bad database. SEC_ERROR_NO_MEMORY -8173 Security library: memory allocation failure. SEC_ERROR_UNTRUSTED_ISSUER -8172 Peer's certificate issuer has been marked as not trusted by ...
... SEC_ERROR_PKCS12_UNABLE_TO_READ -8094 Unable to import. Unable to read the import file. SEC_ERROR_PKCS12_KEY_DATABASE_NOT_INITIALIZED -8093 Unable to export. Key database corrupt or deleted. SEC_ERROR_KEYGEN_FAIL -8092 Unable to generate public-private key pair. SEC_ERROR_INVALID_PASSWORD -8091 Password entered is invalid. SEC_ERROR_RETRY_OLD_PASSWORD -8090 Old password entered incorrectly. SEC_ERROR_BAD_NICKNAME -8089 Certificate nickname already in use. SEC_ERROR_NOT_FORTEZZA_ISSUER -8088 Peer FORTEZZA chain has a non-FORTEZZA Certificate. SEC_ERROR_CANNOT_MOVE_SENSITIVE_KEY -8087 "A sensitive key cannot be moved to the slot where it is needed." SEC_ERROR_JS_INVALID_MOD...
nsIDownloadManager
Read only. activeDownloads nsISimpleEnumerator An enumeration of active nsIDownloads. Read...
...tener( in nsIDownloadProgressListener aListener ); Parameters aListener The nsIDownloadProgressListener object to stop listening to the Download Manager. resumeDownload() Resumes the specified download. void resumeDownload( in unsigned long aID ); Parameters aID The unique ID of the download to resume. Exceptions thrown NS_ERROR_FAILURE The download is not in progress. retryDownload() Retries a failed download. void retryDownload( in unsigned long aID ); Parameters aID The unique ID of the download. Exceptions thrown NS_ERROR_FAILURE If the download is not in the following states: DOWNLOAD_CANCELED or DOWNLOAD_FAILED. NS_ERROR_NOT_AVAILALE If the download id is not known. saveState() Obsolete since Gecko 1.8 (Firefox 1.5 / Thunder...
PaymentRequest.show() - Web APIs
interface by calling show(), specify the detailsPromise parameter, providing a Promise that is fulfilled once the data is ready. If this is provided, show() will not allow the user to interact with the payment interface until the promise is fulfilled, so that data can be updated prior to the user engaging with the payment process. Processing the result and, if necessary, calling PaymentResponse.retry() to retry a failed payment can all be done either asynchronously or synchronously, depending on your needs. For the best user experience, asynchronous solutions are typically the best way to go. Most examples on MDN and elsewhere use async/await to wait asynchronously while results are validated and so forth. Syntax paymentPromise = paymentRequest.show(detailsPromise); Parameters detailsP...
...s called on the response with the string "success", which indicates that everything is valid and that the payment can complete accordingly. If any fields have unacceptable values, or if an exception is thrown by the previous code, complete() is called with the string "fail", which indicates that the payment process is complete and failed. Instead of immediately failing, you could choose to call retry() on the response object to ask the user agent to try to process the payment again; this should usually only be done after the user has made any needed corrections to the order. Starting the payment process, in the end, is as simple as calling the processPayment() method. then/catch syntax You can also use the older promise-based approach to work with payments, using the then() and catch() fun...
PaymentResponse: payerdetailchange event - Web APIs
yerdetailchange events are delivered by the Payment Request API to a PaymentResponse object when the user makes changes to their personal information while filling out a payment request form. The event handler for payerdetailchange should check each value in the form that has changed and ensure that the values are valid. If any are invalid, appropriate error messages should be configured and the retry() method should be called on the PaymentResponse to ask the user to update the invalid entries. Bubbles No Cancelable No Interface PaymentRequestUpdateEvent Event handler property onpayerdetailchange Examples In the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the in...
...hone = payerPhone; } // As each validation promise resolves, add the results of the // validation to the errors list const errors = await Promise.all(promisesToValidate).then(results => results.reduce((errors, result), Object.assign(errors, result)) ); // If we found any errors, wait for them to be corrected if (Object.getOwnPropertyNames(errors).length) { await response.retry(errors); } else { // We have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "POST", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); addEventListener equivalent You could also set up the event handler using the addEventListen...
PaymentResponse - Web APIs
the requestShipping option is set to true in the options parameter of the PaymentRequest() constructor. PaymentResponse.shippingOption Read only Secure context Returns the ID attribute of the shipping option selected by the user. This option is only present when the requestShipping option is set to true in the options parameter of the PaymentRequest() constructor. Methods PaymentResponse.retry() Secure context If something is wrong with the payment response's data (and there is a recoverable error), this method allows a merchant to request that the user retry the payment. The method takes an object as argument, which is used to signal to the user exactly what is wrong with the payment response so they can try to correct any issues. PaymentResponse.complete() Secure context Notifies ...
...ifies the user agent that the user interaction is over. This causes any remaining user interface to be closed. This method should only be called after the Promise returned by the PaymentRequest.show() method. Events Listen to this event using addEventListener() or by assigning an event listener to the oneventname property of this interface. payerdetailchange Secure context Fired during a retry when the user makes changes to their personal information while filling out a payment request form. Allows the developer to revalidate any requested user data (e.g., the phone number or the email address) if it changes. Also available via the onpayerdetailchange property. Specifications Specification Status Comment Payment Request APIThe definition of 'PaymentResponse'...
HTTP Index - HTTP
Web › HTTP › Index
where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example. 175 Referrer-Policy HTTP, HTTP Header, Privacy, Reference, Referrer-Policy, Response, Response Header, referrer The Referrer-Policy HTTP header controls how much referrer information (sent via the Referer header) should be included with requests. 176 Retry-After HTTP, Reference, Response, Response Header, header The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used: 177 Save-Data HTTP, HTTP Header, Reference, Request header, Save-Data, header The Save-Data header field is a boolean which, in requests, indicat...
...e request, usually an upload or a modification of a resource, cannot be made and this error response is sent back. 248 413 Payload Too Large Client error, HTTP, HTTP Status Code, Reference, Status code The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field. 249 414 URI Too Long Client error, HTTP, Reference, Status code The HTTP 414 URI Too Long response status code indicates that the URL requested by the client is longer than the server is willing to interpret. 250 415 Unsupported Media Type Client error, HTTP, HTTP Status Code, Reference, Status code The HTTP 415 Unsupported Media Type ...
429 Too Many Requests - HTTP
Web › HTTP › Status › 429
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting"). A Retry-After header might be included to this response indicating how long to wait before making a new request. ...
... The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time ("rate limiting"). A Retry-After header might be included to this response indicating how long to wait before making a new request. ...
HTTP response status codes - HTTP
Web › HTTP › Status
with this status code. 411 Length Required Server rejected the request because the Content-Length header field is not defined and the server requires it. 412 Precondition Failed The client has indicated preconditions in its headers which the server does not meet. 413 Payload Too Large Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field. 414 URI Too Long The URI requested by the client is longer than the server is willing to interpret. 415 Unsupported Media Type The media format of the requested data is not supported by the server, so the server is rejecting the request. 416 Range Not Satisfiable The range specified by the Range header field in the request can't be fulfilled; it's possible that the range...
...as a gateway to get a response needed to handle the request, got an invalid response. 503 Service Unavailable The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached. 504 Gateway Timeout This error response is given when the server is acting as a gateway and cannot get a response in ...
Updating addons broken by private browsing changes - Archive of obsolete content
icate the privacy status of the pref in question. Use PrivateBrowsingUtils.getPrivacyContextFromWindow(win) to obtain it from the relevant window. nsIDownloadManager/nsIDownload: Integer download IDs (and specifically the id property of nsIDownload) are deprecated, and don't allow access to private downloads. All downloads now use GUIDs, and contain a new guid property. nsIDownload now has retry, cancel, remove, pause, and resume methods which should be used instead of deprecated similarly-named nsIDownloadManager methods. nsIDownload's getDownload method is deprecated; use the asynchronous getDownloadByGUID method instead. nsIDownloadManager now has activePrivateDownloads, activePrivateDownloadCount, and privateDBConnection members to complement the existing public ones. nsIDownloadM...
Automatically Handle Failed Asserts in Debug Builds - Archive of obsolete content
debug builds of Mozilla for Windows. The handler receives the assert string, and sequentially attempts to match each word in the string (left to right) to registry DWORD names from HKLM\Software\mozilla.org\windbgdlg and HKCU\Software\mozilla.org\windbgdlg. At the first match, it will take the action specified by the DWORD's value. The valid values are: 0x5 Automatically ignore 0x4 Automatically retry 0x3 Automatically abort Note that you can also force windbgdlg to prompt, by setting a value of 0xfffffffe. To "comment out" a value, set its value to 0xffffffff. As an example, consider the following failed assertion: ASSERTION: no document: 'mDocument != nsnull', file d:/cvs-1.11.4/mozilla/content/xul/content/src/nsXULElement.cpp, line 3173 (note that I have my source tree in d:/cvs-1.11.4/moz...
Graceful asynchronous programming with Promises - Learn web development
ge); }); To see this in action, try misspelling the URL to the image and reloading the page. The error will be reported in the console of your browser's developer tools. This doesn't do much more than it would if you just didn't bother including the .catch() block at all, but think about it -- this allows us to control error handling exactly how we want. In a real app, your .catch() block could retry fetching the image, or show a default image, or prompt the user to provide a different image URL, or whatever. Note: You can see our version of the example live (see the source code also). Chaining the blocks together This is a very longhand way of writing this out; we've deliberately done this to help you understand what is going on clearly. As shown earlier on in the article, you can chain...
Accessible Toolkit Checklist
Supporting the basic MSAA states on every item: unavailable, focused, readonly, offscreen, focusable To avoid extra work, utilize implementing an MSAA Server Mnemonics Ability to define in XML for any widget with a text label (via attribute or a preceding char in label) Automatically define mnemonics for all standard common dialogs (like Yes/No confirmations and Retry/Exit error dialogs) Support mnemonics in dialogs created via method calls Layout engine - drawing underline under correct letter Events - making keystrokes do the right thing MSAA support, via IAccessible's get_accKeyboardShortcut Support for MS Windows settings When high contrast checkbox is set (in accessibility control panel, SPI_GETHIGHCONTRAST), o...
PR_ConnectContinue
scriptor returned by PR_Poll(). Returns If the nonblocking connect has successfully completed, PR_ConnectContinue returns PR_SUCCESS. If PR_ConnectContinue() returns PR_FAILURE, call PR_GetError(): - PR_IN_PROGRESS_ERROR: the nonblocking connect is still in progress and has not completed yet. The caller should poll the file descriptor for the in_flags PR_POLL_WRITE|PR_POLL_EXCEPT and retry PR_ConnectContinue later when PR_Poll() returns. - Other errors: the nonblocking connect has failed with this error code. Description Continue a nonblocking connect. After a nonblocking connect is initiated with PR_Connect() (which fails with PR_IN_PROGRESS_ERROR), one should call PR_Poll() on the socket, with the in_flags PR_POLL_WRITE | PR_POLL_EXCEPT. When PR_Poll() returns, one call...
NSS 3.41 release notes
Trust Root CA G3 SHA-256 Fingerprint: B7C36231706E81078C367CB896198F1E3208DD926949DD8F5709A410F75B6292 Bugs fixed in NSS 3.41 Bug 1412829, Reject empty supported_signature_algorithms in Certificate Request in TLS 1.2 Bug 1485864 - Cache side-channel variant of the Bleichenbacher attack (CVE-2018-12404) Bug 1481271 - Resend the same ticket in ClientHello after HelloRetryRequest Bug 1493769 - Set session_id for external resumption tokens Bug 1507179 - Reject CCS after handshake is complete in TLS 1.3 This Bugzilla query returns all the bugs fixed in NSS 3.41: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.41 Compatibility NSS 3.41 shared libraries are backwar...
NSS 3.45 release notes
ug 1553443 - Send session ticket only after handshake is marked as finished Bug 1550708 - Fix gyp scripts on Solaris SPARC so that libfreebl_64fpu_3.so builds Bug 1554336 - Optimize away unneeded loop in mpi.c Bug 1559906 - fipstest: use CKM_TLS12_MASTER_KEY_DERIVE instead of vendor specific mechanism Bug 1558126 - TLS_AES_256_GCM_SHA384 should be marked as FIPS compatible Bug 1555207 - HelloRetryRequestCallback return code for rejecting 0-RTT Bug 1556591 - Eliminate races in uses of PK11_SetWrapKey Bug 1558681 - Stop using a global for anti-replay of TLS 1.3 early data Bug 1561510 - Fix a bug where removing -arch XXX args from CC didn't work Bug 1561523 - Add a string for the new-ish error SSL_ERROR_MISSING_POST_HANDSHAKE_AUTH_EXTENSION This Bugzilla query returns all the bugs fixed...
NSS 3.48 release notes
ed in NSS 3.48 Bug 1600775 - Require NSPR 4.24 for NSS 3.48 Bug 1593401 - Fix race condition in self-encrypt functions Bug 1599545 - Fix assertion and add test for early Key Update Bug 1597799 - Fix a crash in nssCKFWObject_GetAttributeSize Bug 1591178 - Add Entrust Root Certification Authority - G4 certificate to NSS Bug 1590001 - Prevent negotiation of versions lower than 1.3 after HelloRetryRequest Bug 1596450 - Added a simplified and unified MAC implementation for HMAC and CMAC behind PKCS#11 Bug 1522203 - Remove an old Pentium Pro performance workaround Bug 1592557 - Fix PRNG known-answer-test scripts Bug 1586176 - EncryptUpdate should use maxout not block size (CVE-2019-11745) Bug 1593141 - add `notBefore` or similar "beginning-of-validity-period" parameter to mozilla::pkix::...
NSS 3.49 release notes
Bug 1588714 - Implement CheckARMSupport for Win64/aarch64 Bug 1585189 - NSS database uses 3DES instead of AES to encrypt DB entries Bug 1603257 - Fix UBSAN issue in softoken CKM_NSS_CHACHA20_CTR initialization Bug 1590001 - Additional HRR Tests (CVE-2019-17023) Bug 1600144 - Treat ClientHello with message_seq of 1 as a second ClientHello Bug 1603027 - Test that ESNI is regenerated after HelloRetryRequest Bug 1593167 - Intermittent mis-reporting potential security risk SEC_ERROR_UNKNOWN_ISSUER Bug 1535787 - Fix automation/release/nss-release-helper.py on MacOS Bug 1594933 - Disable building DBM by default Bug 1562548 - Improve GCM perfomance on aarch32 This Bugzilla query returns all the bugs fixed in NSS 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=...
NSS API Guidelines
ntire search: For small linked listed, queues, or arrays, you can lock over the entire search. This strategy is best when lists are short, or even better if lists are relatively read only (they don't change very often) and using reader/writer locks. Copy the linked list: Instead of operating on the global list, you can copy the list. This also requires small lists. Lock over single element with retry: For medium sized lists, you can secure the reference to each element, complete a test, then detect if the given element has been removed from the list. In the case of removal, the search can either be either restarted, or terminated. This method is a more complicated than the other methods: requiring the calling of search code tolerant to often repeated element inspection. Examples of the previ...
NSS Sample Code Sample_2_Initialization of NSS
progName); fprintf(stderr, "%-15s Specify a DB directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s Specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s Specify a password file\n\n", "-f <plainpasswc>"); exit(-1); } /* Initialize the slot password */ char *InitSlotPassword(PK11SlotInfo *slot, PRBool retry, void *arg) { FILE *input; FILE *output; char *p0 = NULL; char *p1 = NULL; secuPWData *pwdata = (secuPWData *) arg; if (pwdata->source == PW_FROMFILE) { return FilePasswd(slot, retry, pwdata->data); } if (pwdata->source == PW_PLAINTEXT) { return PL_strdup(pwdata->data); } /* open terminal */ inpu...
Initialize NSS database - sample 2
" [-f ]\n\n", progName); fprintf(stderr, "%-15s Specify a DB directory path\n\n", "-d "); fprintf(stderr, "%-15s Specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s Specify a password file\n\n", "-f "); exit(-1); } /* * InitSlotPassword */ char * InitSlotPassword(PK11SlotInfo *slot, PRBool retry, void *arg) { FILE *input; FILE *output; char *p0 = NULL; char *p1 = NULL; secuPWData *pwdata = (secuPWData *) arg; if (pwdata->source == PW_FROMFILE) { return FilePasswd(slot, retry, pwdata->data); } if (pwdata->source == PW_PLAINTEXT) { return PL_strdup(pwdata->data); } /* open terminal */ inpu...
Address book sync client design
CRC has changed, mark the entry modified, if // it's a new record, add an entry and mark it new, if a record was deleted, // mark the entry deleted, etc. // // Sync approach - server handles all conflict resolution: // // Step 2: // Using the sync mapping table and the local records database, generate the change // list to send to the server. Mark any modified or new record with the RET (retry) // flag. // // Step 3: // Get the response back from the server. Since the communication was successful, // clear the RET (retry) flag on all records. Then apply the server changes back // to the local database (updating the CRC's in the process). Save the changes to // the local database, clear the sync mapping table flags and save the new sync // mapping table. // P...
Activity Manager examples
the operations on folders process.init("Processing folder: " + folder.prettiestName, gJunkProcessor); // folder is being filtered/processed process.addSubject(folder); process.cancelHandler = new CancelJunkProcess(); ... Since nsIActivityCancelHandler is provided with the activity, the UI will show a cancel button beside the activity. You can extrapolate this sample to nsIActivityRetryHandler and nsIActivityPauseHandler as well. Showing a user-defined activity with undo capability (C++) ..... #include "nsIActivity.h" #include "nsIActivityManager.h" ..... ////////////////////////////////////////////////////////////////////////////// //// Undo handler implementation class myCopyEventUndo : public nsIActivityUndoHandler { public: NS_DECL_ISUPPORTS NS_DECL_NSIACTIVITYUND...
DirectoryEntrySync - Web APIs
R The path supplied exists, but it is not a directory. removeRecursively() Deletes a directory and all of its contents. You cannot delete the root directory of a file system. If you delete a directory that contains a file that cannot be removed or if an error occurs while the deletion is in progress, some of the contents might not be deleted. Catch these cases with error callbacks and retry the deletion. void removeRecursively ( ) raises (FileException); Parameter None Returns void Exceptions This method can raise a FileException with the following codes: Exception Description NOT_FOUND_ERR The target directory does not exist. INVALID_STATE_ERR This directory is not longer valid for some reason other than being deleted. [todo: Expl...
IDBDatabaseException - Web APIs
operation in the transaction failed because a constraint was not satisfied. For example, an object, such as an object store or index, already exists and a request attempted to create a new one. DATA_ERR 5 Data provided to an operation does not meet requirements. NON_TRANSIENT_ERR 2 An operation was not allowed on an object. Unless the cause of the error is corrected, retrying the same operation would result in failure. NOT_ALLOWED_ERR 6 An operation was called on an object where it is not allowed or at a time when it is not allowed. It also occurs if a request is made on a source object that has been deleted or removed. More specific variants of this error includes: TRANSACTION_INACTIVE_ERR and READ_ONLY_ERR. NOT_FOUND_ERR ...
MediaSource.endOfStream() - Web APIs
network error has occured. This can be used create a custom error handler related to media streams. For example, you might have a function that handles media chunk requests, separate from other network requests. When you make an XMLHttpRequest call for a media chunk, and onabort or onerror triggers, you might want to call endOfStream('network'), display a descriptive message in the UI, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) decode: Terminates playback and signals that a decoding error has occured. This can be used to indicate that a parsing error has occured while fetching media data; maybe the data is corrupt, or is encoded using a codec that the browser doesn't know how to decode. Return value undefined Excep...
PaymentResponse.complete() - Web APIs
ith no input value once the payment interface has been fully closed. If an error occurs, the promise instead rejects, returning one of the exceptions listed below. Exceptions AbortError The document in which the payment request is taking place became inactive while the user interface was shown. InvalidStateError The payment has already completed, or complete() was called while a request to retry the payment is pending. You can't treat a payment as complete after requesting that the payment be tried again. Examples The following example sends payment information to a secure server using the Fetch API. It calls complete() with an answer appropriate to the status in the response. // Initialization of PaymentRequest arguments are excerpted for the // sake of brevity. var payment = new ...
PaymentResponse.onpayerdetailchange - Web APIs
hone = payerPhone; } // As each validation promise resolves, add the results of the // validation to the errors list const errors = await Promise.all(promisesToValidate).then(results => results.reduce((errors, result), Object.assign(errors, result)) ); // If we found any errors, wait for them to be corrected if (Object.getOwnPropertyNames(errors).length) { await response.retry(errors); } else { // We have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "POST", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); Specifications Specification Status Comment Payment Request APIThe d...
PaymentValidationErrors - Web APIs
The PaymentValidationErrors dictionary represents objects providing information about any and all errors that occurred while processing a payment request. When validation of the PaymentResponse returned by the PaymentRequest.show() or PaymentResponse.retry() methods fails, your code creates a PaymentValidationErrors object to pass into retry() so that the user agent knows what needs to be fixed and what if any error messages to display to the user. Properties error Optional A general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information. error can be provided all by itself to provide only a generic error message, or in concert with the other properties to serve as an overview while...
PerformanceResourceTiming.requestStart - Web APIs
There is no end property for requestStart. Note: This feature is available in Web Workers. ...
PromiseRejectionEvent.promise - Web APIs
t's PromiseRejectionEvent.reason property to learn why the promise was rejected. Syntax promise = PromiseRejectionEvent.promise Value The JavaScript Promise which was rejected, and whose rejection went unhandled. Examples This example listens for unhandled promises and, if the reason is an object with a code field containing the text "Module not ready", it sets up an idle callback that will retry the task that failed to execute correctly. event.preventDefault() is called to indicate that the promise has now been handled. window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "Module not ready") { window.requestIdleCallback(function(deadline) { loadModule(event.reason.moduleName) .then(performStartup); }); event.preventDe...
Using server-sent events - Web APIs
() to listen for named events. The onmessage handler is called if no event name is specified for a message. data The data field for the message. When the EventSource receives multiple consecutive lines that begin with data:, it concatenates them, inserting a newline character between each one. Trailing newlines are removed. id The event ID to set the EventSource object's last event ID value. retry The reconnection time to use when attempting to send the event. This must be an integer, specifying the reconnection time in milliseconds. If a non-integer value is specified, the field is ignored. All other field names are ignored. Note: If a line doesn't contain a colon, the entire line is treated as the field name with an empty value string. Examples Data-only messages In the following ...
Connection management in HTTP/1.x - HTTP
hould be kept open). Persistent connections also have drawbacks; even when idling they consume server resources, and under heavy load, DoS attacks can be conducted. In such cases, using non-persistent connections, which are closed as soon as they are idle, can provide better performance. HTTP/1.0 connections are not persistent by default. Setting Connection to anything other than close, usually retry-after, will make them persistent. In HTTP/1.1, persistence is the default, and the header is no longer needed (but it is often added as a defensive measure against cases requiring a fallback to HTTP/1.0). HTTP pipelining HTTP pipelining is not activated by default in modern browsers: Buggy proxies are still common and these lead to strange and erratic behaviors that Web developers cannot f...
Index - HTTP
Web › HTTP › Headers › Index
ervers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example. 95 Referrer-Policy HTTP, HTTP Header, Privacy, Reference, Referrer-Policy, Response, referrer The Referrer-Policy HTTP header governs which referrer information, sent in the Referer header, should be included with requests made. 96 Retry-After HTTP, Reference, Response, Response Header, header The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used: 97 Sec-WebSocket-Accept Draft, HTTP, NeedsCompatTable, NeedsContent, Reference, Sec-WebSocket-Accept, WebSockets, header The Sec-WebSocket-Accept...
HTTP headers - HTTP
Web › HTTP › Headers
message was originated. Large-Allocation Tells the browser that the page being loaded is going to want to perform a large allocation. Link The Link entity-header field provides a means for serialising one or more links in HTTP headers. It is semantically equivalent to the HTML <link> element. Push-Policy A Push-Policy defines the server behaviour regarding push when processing a request. Retry-After Indicates how long the user agent should wait before making a follow-up request. Signature The Signature header field conveys a list of signatures for an exchange, each one accompanied by information about how to determine the authority of and refresh that signature. Signed-Headers The Signed-Headers header field identifies an ordered list of response header fields to include in a ...
Proxy Auto-Configuration (PAC) file - HTTP
PS host:port The specified HTTPS proxy should be used SOCKS4 host:port SOCKS5 host:port The specified SOCKS server (with the specified SOCK version) should be used If there are multiple semicolon-separated settings, the left-most setting will be used, until Firefox fails to establish the connection to the proxy. In that case, the next value will be used, etc. The browser will automatically retry a previously unresponsive proxy after 30 minutes. Additional attempts will continue beginning at one hour, always adding 30 minutes to the elapsed time between attempts. If all proxies are down, and there was no DIRECT option specified, the browser will ask if proxies should be temporarily ignored, and direct connections attempted. After 20 minutes, the browser will ask if proxies should be retr...
413 Payload Too Large - HTTP
Web › HTTP › Status › 413
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field. Status 413 Payload Too Large Specifications Specification Title RFC 7231, section 6.5.11: 413 Payload Too Large Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content ...
501 Not Implemented - HTTP
Web › HTTP › Status › 501
501 is the appropriate response when the server does not recognize the request method and is incapable of supporting it for any resource. The only methods that servers are required to support (and therefore that must not return 501) are GET and HEAD. ...
503 Service Unavailable - HTTP
Web › HTTP › Status › 503
Note: together with this response, a user-friendly page explaining the problem should be sent. ...