Bugzilla Bug 305835: removed NSS_ENABLE_ECC ifdefs under nss/lib except

nss/lib/{freebl,softoken,ssl}. r=nelsonb.
Modified Files:
	cryptohi/keyhi.h cryptohi/manifest.mn cryptohi/seckey.c
	cryptohi/secsign.c freebl/ec.c pk11wrap/manifest.mn
	pk11wrap/pk11akey.c pk11wrap/pk11cert.c pk11wrap/pk11mech.c
	pk11wrap/pk11obj.c pk11wrap/pk11skey.c pkcs12/manifest.mn
	pkcs12/p12d.c pkcs7/config.mk pkcs7/p7decode.c
	pkcs7/p7encode.c smime/cmssiginfo.c smime/cmsutil.c
	smime/config.mk
This commit is contained in:
wtchang%redhat.com 2005-09-02 01:24:57 +00:00
Родитель 449efb1707
Коммит cba3b38bf8
19 изменённых файлов: 8 добавлений и 112 удалений

Просмотреть файл

@ -35,7 +35,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: keyhi.h,v 1.12 2005-02-24 00:35:51 julien.pierre.bugs%sun.com Exp $ */
/* $Id: keyhi.h,v 1.13 2005-09-02 01:24:42 wtchang%redhat.com Exp $ */
#ifndef _KEYHI_H_
#define _KEYHI_H_
@ -283,9 +283,7 @@ SECKEY_AddPublicKeyToListTail( SECKEYPublicKeyList *list,
#define PUBKEY_LIST_NEXT(n) ((SECKEYPublicKeyListNode *)n->links.next)
#define PUBKEY_LIST_END(n,l) (((void *)n) == ((void *)&l->list))
#ifdef NSS_ENABLE_ECC
extern int SECKEY_ECParamsToKeySize(const SECItem *params);
#endif /* NSS_ENABLE_ECC */
SEC_END_PROTOS

Просмотреть файл

@ -65,8 +65,3 @@ LIBSRCS = \
$(NULL)
CSRCS = $(LIBSRCS)
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif

Просмотреть файл

@ -243,7 +243,6 @@ SECKEY_CreateDHPrivateKey(SECKEYDHParams *param, SECKEYPublicKey **pubk, void *c
SECKEYPrivateKey *
SECKEY_CreateECPrivateKey(SECKEYECParams *param, SECKEYPublicKey **pubk, void *cx)
{
#ifdef NSS_ENABLE_ECC
SECKEYPrivateKey *privk;
PK11SlotInfo *slot = PK11_GetBestSlot(CKM_EC_KEY_PAIR_GEN,cx);
@ -255,9 +254,6 @@ SECKEY_CreateECPrivateKey(SECKEYECParams *param, SECKEYPublicKey **pubk, void *c
PK11_FreeSlot(slot);
return(privk);
#else
return NULL;
#endif /* NSS_ENABLE_ECC */
}
void
@ -1105,7 +1101,6 @@ seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki)
break;
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
pubk->keyType = ecKey;
pubk->u.ec.size = 0;
@ -1120,7 +1115,6 @@ seckey_ExtractPublicKey(CERTSubjectPublicKeyInfo *spki)
rv = SECITEM_CopyItem(arena, &pubk->u.ec.publicValue, &newOs);
if (rv == SECSuccess) return pubk;
break;
#endif /* NSS_ENABLE_ECC */
default:
rv = SECFailure;
@ -1317,7 +1311,6 @@ SECKEY_PublicKeyStrength(SECKEYPublicKey *pubk)
pubk->u.dh.publicValue.len - 1;
case fortezzaKey:
return PR_MAX(pubk->u.fortezza.KEAKey.len, pubk->u.fortezza.DSSKey.len);
#ifdef NSS_ENABLE_ECC
case ecKey:
/* Get the key size in bits and adjust */
if (pubk->u.ec.size == 0) {
@ -1325,7 +1318,6 @@ SECKEY_PublicKeyStrength(SECKEYPublicKey *pubk)
SECKEY_ECParamsToKeySize(&pubk->u.ec.DEREncodedParams);
}
return (pubk->u.ec.size + 7)/8;
#endif /* NSS_ENABLE_ECC */
default:
break;
}
@ -1342,14 +1334,12 @@ SECKEY_PublicKeyStrengthInBits(SECKEYPublicKey *pubk)
case dhKey:
case fortezzaKey:
return SECKEY_PublicKeyStrength(pubk) * 8; /* 1 byte = 8 bits */
#ifdef NSS_ENABLE_ECC
case ecKey:
if (pubk->u.ec.size == 0) {
pubk->u.ec.size =
SECKEY_ECParamsToKeySize(&pubk->u.ec.DEREncodedParams);
}
return pubk->u.ec.size;
#endif /* NSS_ENABLE_ECC */
default:
break;
}
@ -1505,7 +1495,6 @@ SECKEY_CopyPublicKey(SECKEYPublicKey *pubk)
rv = SECITEM_CopyItem(arena, &copyk->u.dh.publicValue,
&pubk->u.dh.publicValue);
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
copyk->u.ec.size = pubk->u.ec.size;
rv = SECITEM_CopyItem(arena,&copyk->u.ec.DEREncodedParams,
@ -1514,7 +1503,6 @@ SECKEY_CopyPublicKey(SECKEYPublicKey *pubk)
rv = SECITEM_CopyItem(arena,&copyk->u.ec.publicValue,
&pubk->u.ec.publicValue);
break;
#endif /* NSS_ENABLE_ECC */
case nullKey:
return copyk;
default:
@ -1673,7 +1661,6 @@ SECKEY_CreateSubjectPublicKeyInfo(SECKEYPublicKey *pubk)
}
SECITEM_FreeItem(&params, PR_FALSE);
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
rv = SECITEM_CopyItem(arena, &params,
&pubk->u.ec.DEREncodedParams);
@ -1699,7 +1686,6 @@ SECKEY_CreateSubjectPublicKeyInfo(SECKEYPublicKey *pubk)
return spki;
}
break;
#endif /* NSS_ENABLE_ECC */
case keaKey:
case dhKey: /* later... */

Просмотреть файл

@ -37,7 +37,7 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/* $Id: secsign.c,v 1.13 2005-08-16 01:52:17 wtchang%redhat.com Exp $ */
/* $Id: secsign.c,v 1.14 2005-09-02 01:24:44 wtchang%redhat.com Exp $ */
#include <stdio.h>
#include "cryptohi.h"
@ -121,13 +121,11 @@ SGN_NewContext(SECOidTag alg, SECKEYPrivateKey *key)
signalg = SEC_OID_MISSI_DSS; /* XXX Is there a better algid? */
keyType = fortezzaKey;
break;
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_ECDSA_SIGNATURE_WITH_SHA1_DIGEST:
hashalg = SEC_OID_SHA1;
signalg = SEC_OID_ANSIX962_EC_PUBLIC_KEY;
keyType = ecKey;
break;
#endif /* NSS_ENABLE_ECC */
/* we don't implement MD4 hashes.
* we *CERTAINLY* don't want to sign one! */
case SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION:
@ -374,11 +372,9 @@ SEC_DerSignData(PRArenaPool *arena, SECItem *result,
case dsaKey:
algID = SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST;
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
algID = SEC_OID_ANSIX962_ECDSA_SIGNATURE_WITH_SHA1_DIGEST;
break;
#endif /* NSS_ENABLE_ECC */
default:
PORT_SetError(SEC_ERROR_INVALID_KEY);
return SECFailure;
@ -506,12 +502,10 @@ SEC_GetSignatureAlgorithmOidTag(KeyType keyType, SECOidTag hashAlgTag)
break;
}
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
/* XXX For now only ECDSA with SHA1 is supported */
sigTag = SEC_OID_ANSIX962_ECDSA_SIGNATURE_WITH_SHA1_DIGEST;
break;
#endif /* NSS_ENABLE_ECC */
default:
break;
}

Просмотреть файл

@ -86,8 +86,3 @@ LIBRARY_NAME = pk11wrap
ifdef DEBUG_PKCS11
DEFINES += -DDEBUG_MODULE
endif
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif

Просмотреть файл

@ -152,7 +152,6 @@ PK11_ImportPublicKey(PK11SlotInfo *slot, SECKEYPublicKey *pubKey,
PK11_SETATTRS(attrs, CKA_VALUE, pubKey->u.dh.publicValue.data,
pubKey->u.dh.publicValue.len); attrs++;
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
keyType = CKK_EC;
PK11_SETATTRS(attrs, CKA_VERIFY, &cktrue, sizeof(CK_BBOOL));attrs++;
@ -164,7 +163,6 @@ PK11_ImportPublicKey(PK11SlotInfo *slot, SECKEYPublicKey *pubKey,
PK11_SETATTRS(attrs, CKA_EC_POINT, pubKey->u.ec.publicValue.data,
pubKey->u.ec.publicValue.len); attrs++;
break;
#endif /* NSS_ENABLE_ECC */
default:
PORT_SetError( SEC_ERROR_BAD_KEY );
return CK_INVALID_HANDLE;
@ -221,9 +219,7 @@ PK11_ExtractPublicKey(PK11SlotInfo *slot,KeyType keyType,CK_OBJECT_HANDLE id)
CK_ATTRIBUTE template[8];
CK_ATTRIBUTE *attrs= template;
CK_ATTRIBUTE *modulus,*exponent,*base,*prime,*subprime,*value;
#ifdef NSS_ENABLE_ECC
CK_ATTRIBUTE *ecparams;
#endif /* NSS_ENABLE_ECC */
/* if we didn't know the key type, get it */
if (keyType== nullKey) {
@ -242,11 +238,9 @@ PK11_ExtractPublicKey(PK11SlotInfo *slot,KeyType keyType,CK_OBJECT_HANDLE id)
case CKK_DH:
keyType = dhKey;
break;
#ifdef NSS_ENABLE_ECC
case CKK_EC:
keyType = ecKey;
break;
#endif /* NSS_ENABLE_ECC */
default:
PORT_SetError( SEC_ERROR_BAD_KEY );
return NULL;
@ -351,7 +345,6 @@ PK11_ExtractPublicKey(PK11SlotInfo *slot,KeyType keyType,CK_OBJECT_HANDLE id)
crv = pk11_Attr2SecItem(arena,value,&pubKey->u.dh.publicValue);
if (crv != CKR_OK) break;
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
pubKey->u.ec.size = 0;
ecparams = attrs;
@ -374,7 +367,6 @@ PK11_ExtractPublicKey(PK11SlotInfo *slot,KeyType keyType,CK_OBJECT_HANDLE id)
crv = pk11_Attr2SecItem(arena,value,&pubKey->u.ec.publicValue);
if (crv != CKR_OK) break;
break;
#endif /* NSS_ENABLE_ECC */
case fortezzaKey:
case nullKey:
default:
@ -417,9 +409,7 @@ PK11_MakePrivKey(PK11SlotInfo *slot, KeyType keyType,
case CKK_DSA: keyType = dsaKey; break;
case CKK_DH: keyType = dhKey; break;
case CKK_KEA: keyType = fortezzaKey; break;
#ifdef NSS_ENABLE_ECC
case CKK_EC: keyType = ecKey; break;
#endif /* NSS_ENABLE_ECC */
default:
break;
}
@ -578,12 +568,10 @@ pk11_loadPrivKey(PK11SlotInfo *slot,SECKEYPrivateKey *privKey,
ap->type = CKA_BASE; ap++; count++; extra_count++;
ap->type = CKA_VALUE; ap++; count++; extra_count++;
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
ap->type = CKA_EC_PARAMS; ap++; count++; extra_count++;
ap->type = CKA_VALUE; ap++; count++; extra_count++;
break;
#endif /* NSS_ENABLE_ECC */
default:
count = 0;
extra_count = 0;
@ -710,7 +698,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
{ CKA_VERIFY_RECOVER, NULL, 0},
{ CKA_ENCRYPT, NULL, 0},
};
#ifdef NSS_ENABLE_ECC
CK_ATTRIBUTE ecPubTemplate[] = {
{ CKA_EC_PARAMS, NULL, 0 },
{ CKA_TOKEN, NULL, 0},
@ -722,7 +709,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
};
int ecPubCount = sizeof(ecPubTemplate)/sizeof(ecPubTemplate[0]);
SECKEYECParams * ecParams;
#endif /* NSS_ENABLE_ECC */
int dsaPubCount = sizeof(dsaPubTemplate)/sizeof(dsaPubTemplate[0]);
/*CK_ULONG key_size = 0;*/
@ -870,7 +856,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
keyType = dhKey;
test_mech.mechanism = CKM_DH_PKCS_DERIVE;
break;
#ifdef NSS_ENABLE_ECC
case CKM_EC_KEY_PAIR_GEN:
ecParams = (SECKEYECParams *)param;
attrs = ecPubTemplate;
@ -886,7 +871,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
*/
test_mech.mechanism = CKM_ECDH1_DERIVE;
break;
#endif /* NSS_ENABLE_ECC */
default:
PORT_SetError( SEC_ERROR_BAD_KEY );
return NULL;
@ -910,7 +894,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
case CKM_DH_PKCS_DERIVE:
mechanism_info.flags = CKF_DERIVE;
break;
#ifdef NSS_ENABLE_ECC
case CKM_ECDH1_DERIVE:
mechanism_info.flags = CKF_DERIVE;
break;
@ -918,7 +901,6 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
case CKM_ECDSA_SHA1:
mechanism_info.flags = CKF_SIGN | CKF_VERIFY;
break;
#endif /* NSS_ENABLE_ECC */
default:
break;
}
@ -1019,11 +1001,9 @@ PK11_GenerateKeyPair(PK11SlotInfo *slot,CK_MECHANISM_TYPE type,
case CKM_DH_PKCS_KEY_PAIR_GEN:
pubKeyIndex = &(*pubKey)->u.dh.publicValue;
break;
#ifdef NSS_ENABLE_ECC
case CKM_EC_KEY_PAIR_GEN:
pubKeyIndex = &(*pubKey)->u.ec.publicValue;
break;
#endif /* NSS_ENABLE_ECC */
}
PORT_Assert(pubKeyIndex != NULL);
@ -1125,9 +1105,7 @@ PK11_ImportEncryptedPrivateKeyInfo(PK11SlotInfo *slot,
CKA_UNWRAP, CKA_DECRYPT, CKA_SIGN, CKA_SIGN_RECOVER };
CK_ATTRIBUTE_TYPE dsaUsage[] = { CKA_SIGN };
CK_ATTRIBUTE_TYPE dhUsage[] = { CKA_DERIVE };
#ifdef NSS_ENABLE_ECC
CK_ATTRIBUTE_TYPE ecUsage[] = { CKA_SIGN, CKA_DERIVE };
#endif /* NSS_ENABLE_ECC */
if((epki == NULL) || (pwitem == NULL))
return SECFailure;
@ -1166,7 +1144,6 @@ PK11_ImportEncryptedPrivateKeyInfo(PK11SlotInfo *slot,
usage = dsaUsage;
usageCount = sizeof(dsaUsage)/sizeof(dsaUsage[0]);
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
key_type = CKK_EC;
switch (keyUsage & (KU_DIGITAL_SIGNATURE|KU_KEY_AGREEMENT)) {
@ -1185,7 +1162,6 @@ PK11_ImportEncryptedPrivateKeyInfo(PK11SlotInfo *slot,
break;
}
break;
#endif /* NSS_ENABLE_ECC */
}
try_faulty_3des:
@ -1286,7 +1262,6 @@ pk11_private_key_encrypt_buffer_length(SECKEYPrivateKey *key)
{
CK_ATTRIBUTE rsaTemplate = { CKA_MODULUS, NULL, 0 };
CK_ATTRIBUTE dsaTemplate = { CKA_PRIME, NULL, 0 };
#ifdef NSS_ENABLE_ECC
/* XXX We should normally choose an attribute such that
* factor times its size is enough to hold the private key.
* For EC keys, we have no choice but to use CKA_EC_PARAMS,
@ -1295,7 +1270,6 @@ pk11_private_key_encrypt_buffer_length(SECKEYPrivateKey *key)
* is quite small so we bump up factor from 10 to 15.
*/
CK_ATTRIBUTE ecTemplate = { CKA_EC_PARAMS, NULL, 0 };
#endif /* NSS_ENABLE_ECC */
CK_ATTRIBUTE_PTR pTemplate;
CK_RV crv;
int length;
@ -1313,12 +1287,10 @@ pk11_private_key_encrypt_buffer_length(SECKEYPrivateKey *key)
case dhKey:
pTemplate = &dsaTemplate;
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
pTemplate = &ecTemplate;
factor = 15;
break;
#endif /* NSS_ENABLE_ECC */
case fortezzaKey:
default:
pTemplate = NULL;

Просмотреть файл

@ -191,11 +191,9 @@ PK11_IsUserCert(PK11SlotInfo *slot, CERTCertificate *cert,
pubKey->u.dh.publicValue.len);
break;
case ecKey:
#ifdef NSS_ENABLE_ECC
PK11_SETATTRS(&theTemplate,CKA_EC_POINT,
pubKey->u.ec.publicValue.data,
pubKey->u.ec.publicValue.len);
#endif /* NSS_ENABLE_ECC */
break;
case keaKey:
case fortezzaKey:
@ -759,9 +757,7 @@ PK11_GetPubIndexKeyID(CERTCertificate *cert) {
newItem = SECITEM_DupItem(&pubk->u.dh.publicValue);
break;
case ecKey:
#ifdef NSS_ENABLE_ECC
newItem = SECITEM_DupItem(&pubk->u.ec.publicValue);
#endif /* NSS_ENABLE_ECC */
break;
case fortezzaKey:
default:

Просмотреть файл

@ -1749,10 +1749,8 @@ pk11_mapSignKeyType(KeyType keyType)
case fortezzaKey:
case dsaKey:
return CKM_DSA;
#ifdef NSS_ENABLE_ECC
case ecKey:
return CKM_ECDSA;
#endif /* NSS_ENABLE_ECC */
case dhKey:
default:
break;

Просмотреть файл

@ -505,11 +505,9 @@ int
PK11_SignatureLen(SECKEYPrivateKey *key)
{
int val;
#ifdef NSS_ENABLE_ECC
CK_ATTRIBUTE theTemplate = { CKA_EC_PARAMS, NULL, 0 };
SECItem params = {siBuffer, NULL, 0};
int length;
#endif /* NSS_ENABLE_ECC */
switch (key->keyType) {
case rsaKey:
@ -522,7 +520,6 @@ PK11_SignatureLen(SECKEYPrivateKey *key)
case fortezzaKey:
case dsaKey:
return 40;
#ifdef NSS_ENABLE_ECC
case ecKey:
if (PK11_GetAttributes(NULL, key->pkcs11Slot, key->pkcs11ID,
&theTemplate, 1) == CKR_OK) {
@ -536,7 +533,6 @@ PK11_SignatureLen(SECKEYPrivateKey *key)
return length;
}
break;
#endif /* NSS_ENABLE_ECC */
default:
break;
}

Просмотреть файл

@ -1471,7 +1471,6 @@ PK11_PubDerive(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey,
PORT_SetError( PK11_MapError(crv) );
}
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
{
CK_BBOOL cktrue = CK_TRUE;
@ -1525,10 +1524,6 @@ PK11_PubDerive(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey,
if (crv == CKR_OK) return symKey;
PORT_SetError( PK11_MapError(crv) );
}
#else
case ecKey:
break;
#endif /* NSS_ENABLE_ECC */
}
PK11_FreeSymKey(symKey);
@ -1544,10 +1539,8 @@ PK11_PubDeriveWithKDF(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey,
{
PK11SlotInfo *slot = privKey->pkcs11Slot;
PK11SymKey *symKey;
#ifdef NSS_ENABLE_ECC
CK_MECHANISM mechanism;
CK_RV crv;
#endif
/* get our key Structure */
symKey = pk11_CreateSymKey(slot,target,PR_TRUE,wincx);
@ -1567,7 +1560,6 @@ PK11_PubDeriveWithKDF(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey,
PK11_FreeSymKey(symKey);
return PK11_PubDerive(privKey, pubKey, isSender, randomA, randomB,
derive, target, operation, keySize, wincx);
#ifdef NSS_ENABLE_ECC
case ecKey:
{
CK_BBOOL cktrue = CK_TRUE;
@ -1630,10 +1622,6 @@ PK11_PubDeriveWithKDF(SECKEYPrivateKey *privKey, SECKEYPublicKey *pubKey,
if (crv == CKR_OK) return symKey;
PORT_SetError( PK11_MapError(crv) );
}
#else
case ecKey:
break;
#endif /* NSS_ENABLE_ECC */
}
PK11_FreeSymKey(symKey);

Просмотреть файл

@ -59,8 +59,4 @@ CSRCS = \
REQUIRES = dbm
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif
LIBRARY_NAME = pkcs12

Просмотреть файл

@ -2793,11 +2793,9 @@ sec_pkcs12_get_public_value_and_type(sec_PKCS12SafeBag *certBag,
case rsaKey:
pubValue = SECITEM_DupItem(&pubKey->u.rsa.modulus);
break;
#ifdef NSS_ENABLE_ECC
case ecKey:
pubValue = SECITEM_DupItem(&pubKey->u.ec.publicValue);
break;
#endif /* NSS_ENABLE_ECC */
default:
pubValue = NULL;
}

Просмотреть файл

@ -44,7 +44,3 @@ TARGETS = $(LIBRARY)
SHARED_LIBRARY =
IMPORT_LIBRARY =
PROGRAM =
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif

Просмотреть файл

@ -38,7 +38,7 @@
/*
* PKCS7 decoding, verification.
*
* $Id: p7decode.c,v 1.18 2005-08-12 23:26:38 wtchang%redhat.com Exp $
* $Id: p7decode.c,v 1.19 2005-09-02 01:24:56 wtchang%redhat.com Exp $
*/
#include "nssrenam.h"
@ -1675,9 +1675,7 @@ sec_pkcs7_verify_signature(SEC_PKCS7ContentInfo *cinfo,
algiddata = SECOID_FindOID (&(signerinfo->digestEncAlg.algorithm));
if (algiddata == NULL ||
((algiddata->offset != SEC_OID_PKCS1_RSA_ENCRYPTION) &&
#ifdef NSS_ENABLE_ECC
(algiddata->offset != SEC_OID_ANSIX962_EC_PUBLIC_KEY) &&
#endif /* NSS_ENABLE_ECC */
(algiddata->offset != SEC_OID_ANSIX9_DSA_SIGNATURE))) {
PORT_SetError (SEC_ERROR_PKCS7_BAD_SIGNATURE);
goto done;

Просмотреть файл

@ -38,7 +38,7 @@
/*
* PKCS7 encoding.
*
* $Id: p7encode.c,v 1.10 2005-08-11 23:11:38 wtchang%redhat.com Exp $
* $Id: p7encode.c,v 1.11 2005-09-02 01:24:56 wtchang%redhat.com Exp $
*/
#include "nssrenam.h"
@ -870,7 +870,6 @@ sec_pkcs7_pick_sign_alg (SECOidTag hashalg, SECOidTag encalg)
default:
return SEC_OID_UNKNOWN;
}
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
switch (hashalg) {
case SEC_OID_SHA1:
@ -878,7 +877,6 @@ sec_pkcs7_pick_sign_alg (SECOidTag hashalg, SECOidTag encalg)
default:
return SEC_OID_UNKNOWN;
}
#endif /* NSS_ENABLE_ECC */
default:
break;
}

Просмотреть файл

@ -38,7 +38,7 @@
/*
* CMS signerInfo methods.
*
* $Id: cmssiginfo.c,v 1.28 2005-08-12 23:26:38 wtchang%redhat.com Exp $
* $Id: cmssiginfo.c,v 1.29 2005-09-02 01:24:56 wtchang%redhat.com Exp $
*/
#include "cmslocal.h"
@ -386,9 +386,7 @@ NSS_CMSSignerInfo_Verify(NSSCMSSignerInfo *signerinfo,
case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST:
case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:
case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION:
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
#endif /* NSS_ENABLE_ECC */
/* ok */
break;
case SEC_OID_UNKNOWN:

Просмотреть файл

@ -38,7 +38,7 @@
/*
* CMS miscellaneous utility functions.
*
* $Id: cmsutil.c,v 1.12 2005-08-12 23:22:28 wtchang%redhat.com Exp $
* $Id: cmsutil.c,v 1.13 2005-09-02 01:24:56 wtchang%redhat.com Exp $
*/
#include "nssrenam.h"
@ -256,7 +256,6 @@ NSS_CMSUtil_MakeSignatureAlgorithm(SECOidTag hashalg, SECOidTag encalg)
default:
return SEC_OID_UNKNOWN;
}
#ifdef NSS_ENABLE_ECC
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
switch (hashalg) {
case SEC_OID_SHA1:
@ -264,7 +263,6 @@ NSS_CMSUtil_MakeSignatureAlgorithm(SECOidTag hashalg, SECOidTag encalg)
default:
return SEC_OID_UNKNOWN;
}
#endif /* NSS_ENABLE_ECC */
default:
break;
}

Просмотреть файл

@ -97,7 +97,3 @@ ifeq ($(OS_TARGET),SunOS)
# dependencies in the same directory where it resides.
MKSHLIB += -R '$$ORIGIN'
endif
ifdef NSS_ENABLE_ECC
DEFINES += -DNSS_ENABLE_ECC
endif