Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Static Public Attributes
nsSSLIOLayerHelpers Class Reference

#include <nsNSSIOLayer.h>

Collaboration diagram for nsSSLIOLayerHelpers:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static nsresult Init ()
static void Cleanup ()
static PRBool rememberPossibleTLSProblemSite (PRFileDesc *fd, nsNSSSocketInfo *socketInfo)
static void addIntolerantSite (const nsCString &str)
static PRBool isKnownAsIntolerantSite (const nsCString &str)

Static Public Attributes

static PRDescIdentity nsSSLIOLayerIdentity
static PRIOMethods nsSSLIOLayerMethods
static PRLockmutex = nsnull
static nsCStringHashSet * mTLSIntolerantSites = nsnull
static PRFileDescmSharedPollableEvent = nsnull
static nsNSSSocketInfomSocketOwningPollableEvent = nsnull
static PRBool mPollableEventCurrentlySet = PR_FALSE

Detailed Description

Definition at line 220 of file nsNSSIOLayer.h.


Member Function Documentation

Definition at line 1542 of file nsNSSIOLayer.cpp.

Here is the caller graph for this function:

Definition at line 531 of file nsNSSIOLayer.cpp.

Here is the call graph for this function:

Definition at line 1488 of file nsNSSIOLayer.cpp.

{
  nsSSLIOLayerIdentity = PR_GetUniqueIdentity("NSS layer");
  nsSSLIOLayerMethods  = *PR_GetDefaultIOMethods();

  nsSSLIOLayerMethods.available = (PRAvailableFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.available64 = (PRAvailable64FN)_PSM_InvalidInt64;
  nsSSLIOLayerMethods.fsync = (PRFsyncFN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.seek = (PRSeekFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.seek64 = (PRSeek64FN)_PSM_InvalidInt64;
  nsSSLIOLayerMethods.fileInfo = (PRFileInfoFN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.fileInfo64 = (PRFileInfo64FN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.writev = (PRWritevFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.accept = (PRAcceptFN)_PSM_InvalidDesc;
  nsSSLIOLayerMethods.bind = (PRBindFN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.listen = (PRListenFN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.shutdown = (PRShutdownFN)_PSM_InvalidStatus;
  nsSSLIOLayerMethods.recvfrom = (PRRecvfromFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.sendto = (PRSendtoFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.acceptread = (PRAcceptreadFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.transmitfile = (PRTransmitfileFN)_PSM_InvalidInt;
  nsSSLIOLayerMethods.sendfile = (PRSendfileFN)_PSM_InvalidInt;

  nsSSLIOLayerMethods.getsockname = PSMGetsockname;
  nsSSLIOLayerMethods.getpeername = PSMGetpeername;
  nsSSLIOLayerMethods.getsocketoption = PSMGetsocketoption;
  nsSSLIOLayerMethods.setsocketoption = PSMSetsocketoption;
  nsSSLIOLayerMethods.recv = PSMRecv;
  nsSSLIOLayerMethods.send = PSMSend;
  nsSSLIOLayerMethods.connectcontinue = PSMConnectcontinue;

  nsSSLIOLayerMethods.connect = nsSSLIOLayerConnect;
  nsSSLIOLayerMethods.close = nsSSLIOLayerClose;
  nsSSLIOLayerMethods.write = nsSSLIOLayerWrite;
  nsSSLIOLayerMethods.read = nsSSLIOLayerRead;
  nsSSLIOLayerMethods.poll = nsSSLIOLayerPoll;

  mutex = PR_NewLock();
  if (!mutex)
    return NS_ERROR_OUT_OF_MEMORY;

  mSharedPollableEvent = PR_NewPollableEvent();

  // if we can not get a pollable event, we'll have to do busy waiting

  mTLSIntolerantSites = new nsCStringHashSet();
  if (!mTLSIntolerantSites)
    return NS_ERROR_OUT_OF_MEMORY;

  mTLSIntolerantSites->Init(1);

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 1548 of file nsNSSIOLayer.cpp.

{
  nsAutoLock lock(mutex);
  return mTLSIntolerantSites->Contains(str);
}

Here is the caller graph for this function:

Definition at line 992 of file nsNSSIOLayer.cpp.

{
  PRBool currentlyUsesTLS = PR_FALSE;

  SSL_OptionGet(ssl_layer_fd, SSL_ENABLE_TLS, &currentlyUsesTLS);
  if (currentlyUsesTLS) {
    // Add this site to the list of TLS intolerant sites.
    PRInt32 port;
    nsXPIDLCString host;
    socketInfo->GetPort(&port);
    socketInfo->GetHostName(getter_Copies(host));
    nsCAutoString key;
    key = host + NS_LITERAL_CSTRING(":") + nsPrintfCString("%d", port);

    addIntolerantSite(key);
  }
  
  return currentlyUsesTLS;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 240 of file nsNSSIOLayer.h.

Definition at line 237 of file nsNSSIOLayer.h.

Definition at line 238 of file nsNSSIOLayer.h.

nsCStringHashSet * nsSSLIOLayerHelpers::mTLSIntolerantSites = nsnull [static]

Definition at line 230 of file nsNSSIOLayer.h.

Definition at line 229 of file nsNSSIOLayer.h.

Definition at line 226 of file nsNSSIOLayer.h.

Definition at line 227 of file nsNSSIOLayer.h.


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