Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions | Variables
nsPKCS12Blob.cpp File Reference
#include "prmem.h"
#include "prprf.h"
#include "nsISupportsArray.h"
#include "nsIFile.h"
#include "nsNetUtil.h"
#include "nsILocalFile.h"
#include "nsIDirectoryService.h"
#include "nsIWindowWatcher.h"
#include "nsIPrompt.h"
#include "nsProxiedService.h"
#include "nsNSSComponent.h"
#include "nsNSSHelper.h"
#include "nsPKCS12Blob.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsXPIDLString.h"
#include "nsDirectoryServiceDefs.h"
#include "nsNSSCertificate.h"
#include "nsKeygenHandler.h"
#include "nsPK11TokenDB.h"
#include "nsICertificateDialogs.h"
#include "nsNSSShutDown.h"
#include "nsCRT.h"
#include "pk11func.h"
#include "secerr.h"
#include "nsNSSCleaner.h"

Go to the source code of this file.

Defines

#define PIP_PKCS12_TMPFILENAME   NS_LITERAL_CSTRING(".pip_p12tmp")
#define PIP_PKCS12_BUFFER_SIZE   2048
#define PIP_PKCS12_RESTORE_OK   1
#define PIP_PKCS12_BACKUP_OK   2
#define PIP_PKCS12_USER_CANCELED   3
#define PIP_PKCS12_NOSMARTCARD_EXPORT   4
#define PIP_PKCS12_RESTORE_FAILED   5
#define PIP_PKCS12_BACKUP_FAILED   6
#define PIP_PKCS12_NSS_ERROR   7

Functions

 NSSCleanupAutoPtrClass (CERTCertificate, CERT_DestroyCertificate) static NS_DEFINE_CID(kNSSComponentCID
static PRBool isExtractable (SECKEYPrivateKey *privKey)
PRBool pip_ucs2_ascii_conversion_fn (PRBool toUnicode, unsigned char *inBuf, unsigned int inBufLen, unsigned char *outBuf, unsigned int maxOutBufLen, unsigned int *outBufLen, PRBool swapBytes)

Variables

 NS_NSSCOMPONENT_CID

Define Documentation

Definition at line 84 of file nsPKCS12Blob.cpp.

Definition at line 80 of file nsPKCS12Blob.cpp.

Definition at line 78 of file nsPKCS12Blob.cpp.

Definition at line 82 of file nsPKCS12Blob.cpp.

Definition at line 85 of file nsPKCS12Blob.cpp.

Definition at line 83 of file nsPKCS12Blob.cpp.

Definition at line 79 of file nsPKCS12Blob.cpp.

Definition at line 77 of file nsPKCS12Blob.cpp.

Definition at line 81 of file nsPKCS12Blob.cpp.


Function Documentation

static PRBool isExtractable ( SECKEYPrivateKey *  privKey) [static]

Definition at line 318 of file nsPKCS12Blob.cpp.

{
  SECItem value;
  PRBool  isExtractable = PR_FALSE;
  SECStatus rv;

  rv=PK11_ReadRawAttribute(PK11_TypePrivKey, privKey, CKA_EXTRACTABLE, &value);
  if (rv != SECSuccess) {
    return PR_FALSE;
  }
  if ((value.len == 1) && (value.data != NULL)) {
    isExtractable = *(CK_BBOOL*)value.data;
  }
  SECITEM_FreeItem(&value, PR_FALSE);
  return isExtractable;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NSSCleanupAutoPtrClass ( CERTCertificate  ,
CERT_DestroyCertificate   
)
PRBool pip_ucs2_ascii_conversion_fn ( PRBool  toUnicode,
unsigned char *  inBuf,
unsigned int  inBufLen,
unsigned char *  outBuf,
unsigned int  maxOutBufLen,
unsigned int outBufLen,
PRBool  swapBytes 
)

Definition at line 817 of file nsPKCS12Blob.cpp.

{
  // do a no-op, since I've already got unicode.  Hah!
  *outBufLen = inBufLen;
  memcpy(outBuf, inBuf, inBufLen);
  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 75 of file nsPKCS12Blob.cpp.