Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsClientAuthRemember.cpp File Reference
#include "nsClientAuthRemember.h"
#include "nsIX509Cert.h"
#include "nsCRT.h"
#include "nsNetUtil.h"
#include "nsIObserverService.h"
#include "nsISupportsPrimitives.h"
#include "nsPromiseFlatString.h"
#include "nsProxiedService.h"
#include "nsStringBuffer.h"
#include "nsAutoLock.h"
#include "nspr.h"
#include "pk11pub.h"
#include "certdb.h"
#include "sechash.h"
#include "ssl.h"
#include "nsNSSCleaner.h"

Go to the source code of this file.

Functions

 NSSCleanupAutoPtrClass (CERTCertificate, CERT_DestroyCertificate) NS_IMPL_THREADSAFE_ISUPPORTS2(nsClientAuthRememberService
static nsresult GetCertFingerprintByOidTag (CERTCertificate *nsscert, SECOidTag aOidTag, nsCString &fp)

Variables

 nsIObserver

Function Documentation

static nsresult GetCertFingerprintByOidTag ( CERTCertificate *  nsscert,
SECOidTag  aOidTag,
nsCString fp 
) [static]

Definition at line 133 of file nsClientAuthRemember.cpp.

{
  unsigned int hash_len = HASH_ResultLenByOidTag(aOidTag);
  nsRefPtr<nsStringBuffer> fingerprint = nsStringBuffer::Alloc(hash_len);
  if (!fingerprint)
    return NS_ERROR_OUT_OF_MEMORY;

  PK11_HashBuf(aOidTag, (unsigned char*)fingerprint->Data(), 
               nsscert->derCert.data, nsscert->derCert.len);

  SECItem fpItem;
  fpItem.data = (unsigned char*)fingerprint->Data();
  fpItem.len = hash_len;

  fp.Adopt(CERT_Hexify(&fpItem, 1));
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NSSCleanupAutoPtrClass ( CERTCertificate  ,
CERT_DestroyCertificate   
)

Variable Documentation

Definition at line 62 of file nsClientAuthRemember.cpp.