Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Attributes
nsNSSDialogs Class Reference

#include <nsNSSDialogs.h>

Inheritance diagram for nsNSSDialogs:
Inheritance graph
[legend]
Collaboration diagram for nsNSSDialogs:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSITOKENPASSWORDDIALOGS
NS_DECL_NSIBADCERTLISTENER
NS_DECL_NSICERTIFICATEDIALOGS
NS_DECL_NSICLIENTAUTHDIALOGS
NS_DECL_NSICERTPICKDIALOGS
NS_DECL_NSITOKENDIALOGS
NS_DECL_NSIDOMCRYPTODIALOGS
NS_DECL_NSIGENERATINGKEYPAIRINFODIALOGS 
nsNSSDialogs ()
virtual ~nsNSSDialogs ()
nsresult Init ()
void setPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out boolean canceled)
 setPassword - sets the password/PIN on the named token.
void getPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out wstring password, out boolean canceled)
boolean confirmUnknownIssuer (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert, out short certAddType)
 Inform the user there are problems with the trust of a certificate, and request a decision from the user.
boolean confirmMismatchDomain (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert)
 Inform the user there are problems with the trust of a certificate, and request a decision from the user.
boolean confirmCertExpired (in nsIInterfaceRequestor socketInfo, in nsIX509Cert cert)
 Inform the user there are problems with the trust of a certificate, and request a decision from the user.
void notifyCrlNextupdate (in nsIInterfaceRequestor socketInfo, in AUTF8String targetURL, in nsIX509Cert cert)
 Inform the user there are problems with the trust of a certificate, and request a decision from the user.
boolean confirmDownloadCACert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert, out unsigned long trust)
 UI shown when a user is asked to download a new CA cert.
void notifyCACertExists (in nsIInterfaceRequestor ctx)
 UI shown when a web site has delivered a CA certificate to be imported, but the certificate is already contained in the user's storage.
boolean setPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password)
 UI shown when a user's personal certificate is going to be exported to a backup file.
boolean getPKCS12FilePassword (in nsIInterfaceRequestor ctx, out AString password)
 UI shown when a user is about to restore a personal certificate from a backup file.
void viewCert (in nsIInterfaceRequestor ctx, in nsIX509Cert cert)
 UI shown when a certificate needs to be shown to the user.
void crlImportStatusDialog (in nsIInterfaceRequestor ctx, in nsICRLInfo crl)
 UI shown after a Certificate Revocation List (CRL) has been successfully imported.
void ChooseCertificate (in nsIInterfaceRequestor ctx, in wstring cn, in wstring organization, in wstring issuer,[array, size_is(count)] in wstring certNickList,[array, size_is(count)] in wstring certDetailsList, in unsigned long count, out long selectedIndex, out boolean canceled)
 display UI shown when a user is asked to do SSL client auth.
void PickCertificate (in nsIInterfaceRequestor ctx,[array, size_is(count)] in wstring certNickList,[array, size_is(count)] in wstring certDetailsList, in unsigned long count, inout long selectedIndex, out boolean canceled)
 PickCertificate General purpose certificate prompter.
void ChooseToken (in nsIInterfaceRequestor ctx,[array, size_is(count)] in wstring tokenNameList, in unsigned long count, out wstring tokenName, out boolean canceled)
boolean ConfirmKeyEscrow (in nsIX509Cert escrowAuthority)
 This method is used to warn the user the web site is trying to escrow the generated private key.
void displayGeneratingKeypairInfo (in nsIInterfaceRequestor ctx, in nsIKeygenThread runnable)

Public Attributes

const short UNINIT_ADD_FLAG = -1
 No decision was made by the user, whether to trust a cert.
const short ADD_TRUSTED_FOR_SESSION = 1
 The user decided to add trust to a certificate temporarily for the current application session only.
const short ADD_TRUSTED_PERMANENTLY = 2
 The user decided to add trust to a certificate permanently.

Protected Attributes

nsCOMPtr< nsIStringBundlemPIPStringBundle

Detailed Description

Definition at line 59 of file nsNSSDialogs.h.


Constructor & Destructor Documentation

Definition at line 77 of file nsNSSDialogs.cpp.

{
}

Definition at line 81 of file nsNSSDialogs.cpp.

{
}

Member Function Documentation

void nsIClientAuthDialogs::ChooseCertificate ( in nsIInterfaceRequestor  ctx,
in wstring  cn,
in wstring  organization,
in wstring  issuer,
[array, size_is(count)] in wstring  certNickList,
[array, size_is(count)] in wstring  certDetailsList,
in unsigned long  count,
out long  selectedIndex,
out boolean  canceled 
) [inherited]

display UI shown when a user is asked to do SSL client auth.

void nsITokenDialogs::ChooseToken ( in nsIInterfaceRequestor  ctx,
[array, size_is(count)] in wstring  tokenNameList,
in unsigned long  count,
out wstring  tokenName,
out boolean  canceled 
) [inherited]

Inform the user there are problems with the trust of a certificate, and request a decision from the user.

The certificate presented by the server is no longer valid because the validity period has expired.

Parameters:
socketInfoA network communication context that can be used to obtain more information about the active connection.
certThe certificate that was presented by the server.
Returns:
true if the user decided to connect anyway, false if the user decided to not connect

UI shown when a user is asked to download a new CA cert.

Provides user with ability to choose trust settings for the cert. Asks the user to grant permission to import the certificate.

Parameters:
ctxA user interface context.
certThe certificate that is about to get installed.
trusta bit mask of trust flags, see nsIX509CertDB for possible values.
Returns:
true if the user allows to import the certificate.
boolean nsIDOMCryptoDialogs::ConfirmKeyEscrow ( in nsIX509Cert  escrowAuthority) [inherited]

This method is used to warn the user the web site is trying to escrow the generated private key.

This method should return true if the user wants to proceed and false if the user cancels the action.

boolean nsIBadCertListener::confirmMismatchDomain ( in nsIInterfaceRequestor  socketInfo,
in AUTF8String  targetURL,
in nsIX509Cert  cert 
) [inherited]

Inform the user there are problems with the trust of a certificate, and request a decision from the user.

The hostname mentioned in the server's certificate is not the hostname that was used as a destination address for the current connection.

Parameters:
socketInfoA network communication context that can be used to obtain more information about the active connection.
targetURLThe URL that was used to open the current connection.
certThe certificate that was presented by the server.
Returns:
true if the user decided to connect anyway, false if the user decided to not connect
boolean nsIBadCertListener::confirmUnknownIssuer ( in nsIInterfaceRequestor  socketInfo,
in nsIX509Cert  cert,
out short  certAddType 
) [inherited]

Inform the user there are problems with the trust of a certificate, and request a decision from the user.

The UI should offer the user a way to look at the certificate in detail. The following is a sample UI message to be shown to the user:

Unable to verify the identity of S as a trusted site. Possible reasons for this error:

  • Your browser does not recognize the Certificate Authority that issued the site's certificate.
  • The site's certificate is incomplete due to a server misconfiguration.
  • You are connected to a site pretending to be S, possibly to obtain your confidential information. Please notify the site's webmaster about this problem. Before accepting this certificate, you should examine this site's certificate carefully. Are you willing to to accept this certificate for the purpose of identifying the Web site S? o Accept this certificate permanently x Accept this certificate temporarily for this session o Do not accept this certificate and do not connect to this Web site
Parameters:
socketInfoA network communication context that can be used to obtain more information about the active connection.
certThe certificate that is not trusted and that is having the problem.
certAddTypeThe user's trust decision. See constants defined above.
Returns:
true if the user decided to connect anyway, false if the user decided to not connect

UI shown after a Certificate Revocation List (CRL) has been successfully imported.

Parameters:
ctxA user interface context.
crlInformation describing the CRL that was imported.
void nsITokenPasswordDialogs::getPassword ( in nsIInterfaceRequestor  ctx,
in wstring  tokenName,
out wstring  password,
out boolean  canceled 
) [inherited]

UI shown when a user is about to restore a personal certificate from a backup file.

The user is requested to enter the password that was used in the past to protect that backup file.

Parameters:
ctxA user interface context.
passwordThe password provided by the user.
Returns:
false if the user requests to cancel.

UI shown when a web site has delivered a CA certificate to be imported, but the certificate is already contained in the user's storage.

Parameters:
ctxA user interface context.
void nsIBadCertListener::notifyCrlNextupdate ( in nsIInterfaceRequestor  socketInfo,
in AUTF8String  targetURL,
in nsIX509Cert  cert 
) [inherited]

Inform the user there are problems with the trust of a certificate, and request a decision from the user.

The Certificate Authority (CA) that issued the server's certificate has issued a Certificate Revocation List (CRL). However, the application does not have a current version of the CA's CRL. Due to the application configuration, the application disallows the connection to the remote site.

Parameters:
socketInfoA network communication context that can be used to obtain more information about the active connection.
targetURLThe URL that was used to open the current connection.
certThe certificate that was presented by the server.
void nsICertPickDialogs::PickCertificate ( in nsIInterfaceRequestor  ctx,
[array, size_is(count)] in wstring  certNickList,
[array, size_is(count)] in wstring  certDetailsList,
in unsigned long  count,
inout long  selectedIndex,
out boolean  canceled 
) [inherited]

PickCertificate General purpose certificate prompter.

void nsITokenPasswordDialogs::setPassword ( in nsIInterfaceRequestor  ctx,
in wstring  tokenName,
out boolean  canceled 
) [inherited]

setPassword - sets the password/PIN on the named token.

The canceled output value should be set to TRUE when the user (or implementation) cancels the operation.

UI shown when a user's personal certificate is going to be exported to a backup file.

The implementation of this dialog should make sure to prompt the user to type the password twice in order to confirm correct input. The wording in the dialog should also motivate the user to enter a strong password.

Parameters:
ctxA user interface context.
passwordThe password provided by the user.
Returns:
false if the user requests to cancel.

UI shown when a certificate needs to be shown to the user.

The implementation should try to display as many attributes as possible.

Parameters:
ctxA user interface context.
certThe certificate to be shown to the user.

Member Data Documentation

The user decided to add trust to a certificate temporarily for the current application session only.

Definition at line 62 of file nsIBadCertListener.idl.

The user decided to add trust to a certificate permanently.

Definition at line 67 of file nsIBadCertListener.idl.

Definition at line 85 of file nsNSSDialogs.h.

No decision was made by the user, whether to trust a cert.

Definition at line 56 of file nsIBadCertListener.idl.


The documentation for this class was generated from the following files: