~ubuntu-branches/ubuntu/karmic/nss/karmic-updates

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/ckfw/crypto.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-06-16 13:23:47 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090616132347-311ysb8oep74b98y
Tags: 3.12.3-0ubuntu1
* new upstream release 3.12.3 RTM (NSS_3_12_3_RTM) (LP: #387751)
* adjust patches to changed upstream code base
  - update debian/patches/38_kbsd.patch
* needs nspr >= 4.7.4
  - update debian/control
* update 85_security_load.patch to latest debian version
  - update debian/patches/85_security_load.patch
* add new symbols for 3.12.3
  - update debian/libnss3-1d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 * ***** END LICENSE BLOCK ***** */
37
37
 
38
38
#ifdef DEBUG
39
 
static const char CVS_ID[] = "@(#) $RCSfile: crypto.c,v $ $Revision: 1.3 $ $Date: 2006/04/22 05:30:18 $";
 
39
static const char CVS_ID[] = "@(#) $RCSfile: crypto.c,v $ $Revision: 1.4 $ $Date: 2009/02/09 07:55:51 $";
40
40
#endif /* DEBUG */
41
41
 
42
42
/*
101
101
{
102
102
  NSSCKFWCryptoOperation *fwOperation;
103
103
  fwOperation = nss_ZNEW(NULL, NSSCKFWCryptoOperation);
104
 
  if ((NSSCKFWCryptoOperation *)NULL == fwOperation) {
 
104
  if (!fwOperation) {
105
105
    *pError = CKR_HOST_MEMORY;
106
106
    return (NSSCKFWCryptoOperation *)NULL;
107
107
  }
126
126
)
127
127
{
128
128
  if ((NSSCKMDCryptoOperation *) NULL != fwOperation->mdOperation) {
129
 
    if ((void *) NULL != (void *)fwOperation->mdOperation->Destroy) {
 
129
    if (fwOperation->mdOperation->Destroy) {
130
130
      fwOperation->mdOperation->Destroy(
131
131
                                fwOperation->mdOperation,
132
132
                                fwOperation,
171
171
  CK_RV *pError
172
172
)
173
173
{
174
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->GetFinalLength) {
 
174
  if (!fwOperation->mdOperation->GetFinalLength) {
175
175
    *pError = CKR_FUNCTION_FAILED;
176
176
    return 0;
177
177
  }
198
198
  CK_RV *pError
199
199
)
200
200
{
201
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->GetOperationLength) {
 
201
  if (!fwOperation->mdOperation->GetOperationLength) {
202
202
    *pError = CKR_FUNCTION_FAILED;
203
203
    return 0;
204
204
  }
225
225
  NSSItem *outputBuffer
226
226
)
227
227
{
228
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->Final) {
 
228
  if (!fwOperation->mdOperation->Final) {
229
229
    return CKR_FUNCTION_FAILED;
230
230
  }
231
231
  return fwOperation->mdOperation->Final(
251
251
  NSSItem *outputBuffer
252
252
)
253
253
{
254
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->Update) {
 
254
  if (!fwOperation->mdOperation->Update) {
255
255
    return CKR_FUNCTION_FAILED;
256
256
  }
257
257
  return fwOperation->mdOperation->Update(
277
277
  NSSItem *inputBuffer
278
278
)
279
279
{
280
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->DigestUpdate) {
 
280
  if (!fwOperation->mdOperation->DigestUpdate) {
281
281
    return CKR_FUNCTION_FAILED;
282
282
  }
283
283
  return fwOperation->mdOperation->DigestUpdate(
304
304
{
305
305
  NSSCKMDObject *mdObject;
306
306
 
307
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->DigestKey) {
 
307
  if (!fwOperation->mdOperation->DigestKey) {
308
308
    return CKR_FUNCTION_FAILED;
309
309
  }
310
310
  mdObject = nssCKFWObject_GetMDObject(fwObject);
330
330
  NSSItem *outputBuffer
331
331
)
332
332
{
333
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->UpdateFinal) {
 
333
  if (!fwOperation->mdOperation->UpdateFinal) {
334
334
    return CKR_FUNCTION_FAILED;
335
335
  }
336
336
  return fwOperation->mdOperation->UpdateFinal(
358
358
  NSSItem *outputBuffer
359
359
)
360
360
{
361
 
  if ((void *) NULL == (void *)fwOperation->mdOperation->UpdateCombo) {
 
361
  if (!fwOperation->mdOperation->UpdateCombo) {
362
362
    return CKR_FUNCTION_FAILED;
363
363
  }
364
364
  return fwOperation->mdOperation->UpdateCombo(