From 36dc0e2931563d765570c9841b419ac46cd46008 Mon Sep 17 00:00:00 2001 From: "nicolson%netscape.com" Date: Tue, 16 Jan 2001 23:49:57 +0000 Subject: [PATCH] remove export controls, and get things to build against NSS 3.1.1 under mozilla. --- security/jss/org/mozilla/jss/asn1/manifest.mn | 2 +- .../jss/crypto/EncryptionAlgorithm.java | 55 --- .../mozilla/jss/crypto/KeyGenAlgorithm.java | 38 -- .../mozilla/jss/crypto/KeyPairAlgorithm.java | 30 -- .../mozilla/jss/crypto/KeyWrapAlgorithm.java | 50 --- .../org/mozilla/jss/crypto/PBEAlgorithm.java | 54 --- .../jss/org/mozilla/jss/crypto/PQGParams.c | 3 +- .../jss/crypto/SignatureAlgorithm.java | 47 --- security/jss/org/mozilla/jss/crypto/config.mk | 34 -- .../jss/org/mozilla/jss/crypto/manifest.mn | 2 +- .../jss/org/mozilla/jss/hclhacks/config.mk | 34 -- .../jss/org/mozilla/jss/hclhacks/manifest.mn | 49 --- .../jss/org/mozilla/jss/hclhacks/secvfy.c | 382 ------------------ .../org/mozilla/jss/manage/CryptoManager.c | 112 +---- .../org/mozilla/jss/manage/CryptoManager.java | 56 +-- .../jss/org/mozilla/jss/manage/NSSInit.java | 10 +- .../jss/org/mozilla/jss/manage/PK11Finder.c | 4 - security/jss/org/mozilla/jss/manage/config.mk | 40 -- security/jss/org/mozilla/jss/manage/jssinit.h | 18 - .../jss/org/mozilla/jss/manage/manifest.mn | 2 +- .../jss/pkcs10/CertificationRequest.java | 2 +- .../jss/org/mozilla/jss/pkcs10/manifest.mn | 2 +- .../org/mozilla/jss/pkcs11/PK11KeyGenerator.c | 2 + .../mozilla/jss/pkcs11/PK11KeyPairGenerator.c | 2 +- .../org/mozilla/jss/pkcs11/PK11KeyWrapper.c | 1 - .../org/mozilla/jss/pkcs11/PK11Signature.c | 3 +- .../jss/org/mozilla/jss/pkcs11/PK11Token.c | 6 +- security/jss/org/mozilla/jss/pkcs11/config.mk | 37 -- .../jss/org/mozilla/jss/pkcs11/manifest.mn | 3 +- security/jss/org/mozilla/jss/pkcs12/config.mk | 62 --- .../jss/org/mozilla/jss/pkcs12/manifest.mn | 2 +- .../jss/org/mozilla/jss/pkcs7/manifest.mn | 2 +- .../jss/org/mozilla/jss/pkix/cert/manifest.mn | 71 ---- .../jss/org/mozilla/jss/pkix/cmc/manifest.mn | 66 --- .../jss/org/mozilla/jss/pkix/cmmf/manifest.mn | 77 ---- .../jss/org/mozilla/jss/pkix/cms/manifest.mn | 76 ---- .../jss/org/mozilla/jss/pkix/crmf/manifest.mn | 89 ---- security/jss/org/mozilla/jss/pkix/manifest.mn | 2 +- .../mozilla/jss/pkix/primitive/manifest.mn | 85 ---- .../jss/org/mozilla/jss/provider/manifest.mn | 2 +- .../jss/tests/TestExportControlPolicy.java | 0 security/jss/org/mozilla/jss/tests/config.mk | 20 - .../jss/org/mozilla/jss/tests/manifest.mn | 6 +- security/jss/org/mozilla/jss/util/config.mk | 26 -- security/jss/org/mozilla/jss/util/jssutil.c | 2 +- security/jss/org/mozilla/jss/util/manifest.mn | 2 +- 46 files changed, 49 insertions(+), 1621 deletions(-) delete mode 100644 security/jss/org/mozilla/jss/tests/TestExportControlPolicy.java diff --git a/security/jss/org/mozilla/jss/asn1/manifest.mn b/security/jss/org/mozilla/jss/asn1/manifest.mn index 8001b20e740..5ddd783baae 100644 --- a/security/jss/org/mozilla/jss/asn1/manifest.mn +++ b/security/jss/org/mozilla/jss/asn1/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/crypto/EncryptionAlgorithm.java b/security/jss/org/mozilla/jss/crypto/EncryptionAlgorithm.java index b8fdaebe6e9..1e2475a083e 100644 --- a/security/jss/org/mozilla/jss/crypto/EncryptionAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/EncryptionAlgorithm.java @@ -129,59 +129,4 @@ public class EncryptionAlgorithm extends Algorithm { RC2_CBC = new EncryptionAlgorithm(SEC_OID_RC2_CBC, "RC2/CBC", IVParameterSpec.class, 8, false, OBJECT_IDENTIFIER.RSA_CIPHER.subBranch(2) ); - - /////////////////////////////////////////////////////////////////////// - // Export control code - /////////////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 8; - - public EncryptionAlgorithm[] getAllAlgorithms( Usage usage ) { - EncryptionAlgorithm[] algs = new - EncryptionAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case SEC_OID_RC4: - algs[j] = RC4; - j++; - break; - case SEC_OID_DES_ECB: - algs[j] = DES_ECB; - j++; - break; - case SEC_OID_DES_CBC: - algs[j] = DES_CBC; - j++; - break; - case CKM_DES_CBC_PAD: - algs[j] = DES_CBC_PAD; - j++; - break; - case CKM_DES3_ECB: - algs[j] = DES3_ECB; - j++; - break; - case SEC_OID_DES_EDE3_CBC: - algs[j] = DES3_CBC; - j++; - break; - case CKM_DES3_CBC_PAD: - algs[j] = DES3_CBC_PAD; - j++; - break; - case SEC_OID_RC2_CBC: - algs[j] = RC2_CBC; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/KeyGenAlgorithm.java b/security/jss/org/mozilla/jss/crypto/KeyGenAlgorithm.java index d632d4ee949..918303ef02f 100644 --- a/security/jss/org/mozilla/jss/crypto/KeyGenAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/KeyGenAlgorithm.java @@ -110,42 +110,4 @@ public class KeyGenAlgorithm extends Algorithm { PBA_SHA1_HMAC = new KeyGenAlgorithm( CKM_PBA_SHA1_WITH_SHA1_HMAC, "PBA/SHA1/HMAC", 160, null, PBEKeyGenParams.class ); - - ////////////////////////////////////////////////////////////// - // Export control code - ////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 4; - - public KeyGenAlgorithm[] getAllAlgorithms( Usage usage ) { - KeyGenAlgorithm[] algs = new KeyGenAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case CKM_DES_KEY_GEN: - algs[j] = DES; - j++; - break; - case CKM_DES3_KEY_GEN: - algs[j] = DES3; - j++; - break; - case CKM_RC4_KEY_GEN: - algs[j] = RC4; - j++; - break; - case CKM_PBA_SHA1_WITH_SHA1_HMAC: - algs[j] = PBA_SHA1_HMAC; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java b/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java index 076236879b8..53d0e7d7019 100644 --- a/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/KeyPairAlgorithm.java @@ -72,34 +72,4 @@ public class KeyPairAlgorithm extends Algorithm { public static final KeyPairAlgorithm DSA = new KeyPairAlgorithm(CKM_DSA_KEY_PAIR_GEN, "DSA", DSAFamily); - - //////////////////////////////////////////////////////////////// - // Export control code - //////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 4; - - public KeyPairAlgorithm[] getAllAlgorithms( Usage usage ) { - KeyPairAlgorithm[] algs = new KeyPairAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case CKM_RSA_PKCS_KEY_PAIR_GEN: - algs[j] = RSA; - j++; - break; - case CKM_DSA_KEY_PAIR_GEN: - algs[j] = DSA; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/KeyWrapAlgorithm.java b/security/jss/org/mozilla/jss/crypto/KeyWrapAlgorithm.java index bda3da54635..76abc4f72a4 100644 --- a/security/jss/org/mozilla/jss/crypto/KeyWrapAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/KeyWrapAlgorithm.java @@ -84,54 +84,4 @@ public class KeyWrapAlgorithm extends Algorithm { public static final KeyWrapAlgorithm RSA = new KeyWrapAlgorithm(SEC_OID_PKCS1_RSA_ENCRYPTION, "RSA", null, false); - - /////////////////////////////////////////////////////////////////////// - // Export control code - /////////////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 7; - - public KeyWrapAlgorithm[] getAllAlgorithms( Usage usage ) { - KeyWrapAlgorithm[] algs = new KeyWrapAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case SEC_OID_DES_ECB: - algs[j] = DES_ECB; - j++; - break; - case SEC_OID_DES_CBC: - algs[j] = DES_CBC; - j++; - break; - case CKM_DES_CBC_PAD: - algs[j] = DES_CBC_PAD; - j++; - break; - case CKM_DES3_ECB: - algs[j] = DES3_ECB; - j++; - break; - case SEC_OID_DES_EDE3_CBC: - algs[j] = DES3_CBC; - j++; - break; - case CKM_DES3_CBC_PAD: - algs[j] = DES3_CBC_PAD; - j++; - break; - case SEC_OID_PKCS1_RSA_ENCRYPTION: - algs[j] = RSA; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/PBEAlgorithm.java b/security/jss/org/mozilla/jss/crypto/PBEAlgorithm.java index 53b65e1bde5..396fa6e7980 100644 --- a/security/jss/org/mozilla/jss/crypto/PBEAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/PBEAlgorithm.java @@ -140,58 +140,4 @@ public class PBEAlgorithm extends KeyGenAlgorithm { SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC, "PBE/SHA1/RC2-40", 40, PKCS12_PBE.subBranch(6), EncryptionAlgorithm.RC2_CBC, 20 ); - - ////////////////////////////////////////////////////////////// - // Export control code - ////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 8; - - public KeyGenAlgorithm[] getAllAlgorithms( Usage usage ) { - KeyGenAlgorithm[] algs = new KeyGenAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC: - algs[j] = PBE_MD2_DES_CBC; - j++; - break; - case SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC: - algs[j] = PBE_MD5_DES_CBC; - j++; - break; - case SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC: - algs[j] = PBE_SHA1_DES_CBC; - j++; - break; - case SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4: - algs[j] = PBE_SHA1_RC4_128; - j++; - break; - case SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4: - algs[j] = PBE_SHA1_RC4_40; - j++; - break; - case SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC: - algs[j] = PBE_SHA1_DES3_CBC; - j++; - break; - case SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC: - algs[j] = PBE_SHA1_RC2_128_CBC; - j++; - break; - case SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC: - algs[j] = PBE_SHA1_RC2_40_CBC; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/PQGParams.c b/security/jss/org/mozilla/jss/crypto/PQGParams.c index 8c808a8af7d..0413243e0fc 100644 --- a/security/jss/org/mozilla/jss/crypto/PQGParams.c +++ b/security/jss/org/mozilla/jss/crypto/PQGParams.c @@ -39,7 +39,8 @@ #include #include #include /* for PQGParams */ -#include +#include +#include #include #include diff --git a/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java b/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java index 1b469a23ac6..39f2e918a3b 100644 --- a/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java +++ b/security/jss/org/mozilla/jss/crypto/SignatureAlgorithm.java @@ -143,51 +143,4 @@ public class SignatureAlgorithm extends Algorithm { new SignatureAlgorithm(SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST, "DSASignatureWithSHA1Digest", DSASignature, DigestAlgorithm.SHA1, ANSI_X9_ALGORITHM.subBranch(3) ); - - ////////////////////////////////////////////////////////////////////// - // Export control code - ////////////////////////////////////////////////////////////////////// - - private static final int NUMBER_OF_ALGORITHMS = 6; - - public SignatureAlgorithm[] getAllAlgorithms( Usage usage ) { - SignatureAlgorithm[] algs = new - SignatureAlgorithm[NUMBER_OF_ALGORITHMS]; - - long[] indices = getAllAlgorithmIndices( usage ); - - int j = 0; - for( int i = 0; i <= indices.length; i++ ) { - switch( ( int ) indices[i] ) { - case SEC_OID_PKCS1_RSA_ENCRYPTION: - algs[j] = RSASignature ; - j++; - break; - case SEC_OID_ANSIX9_DSA_SIGNATURE: - algs[j] = DSASignature; - j++; - break; - case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION: - algs[j] = RSASignatureWithMD2Digest; - j++; - break; - case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION: - algs[j] = RSASignatureWithMD5Digest; - j++; - break; - case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION: - algs[j] = RSASignatureWithSHA1Digest; - j++; - break; - case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST: - algs[j] = DSASignatureWithSHA1Digest; - j++; - break; - default: - continue; - } - } - - return algs; - } } diff --git a/security/jss/org/mozilla/jss/crypto/config.mk b/security/jss/org/mozilla/jss/crypto/config.mk index 6bdda6bde1b..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/crypto/config.mk +++ b/security/jss/org/mozilla/jss/crypto/config.mk @@ -30,37 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBJSSUTIL) \ - $(LIBJSSPOLICY) \ - $(LIBSECMOD) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBHASH) \ - $(LIBSECUTIL) \ - $(LIBDBM) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - -####################################################################### -# Turn off any Export Control Policy for these libraries # -####################################################################### - -POLICY = - diff --git a/security/jss/org/mozilla/jss/crypto/manifest.mn b/security/jss/org/mozilla/jss/crypto/manifest.mn index 6e6cf1f1a14..765e625b8fb 100644 --- a/security/jss/org/mozilla/jss/crypto/manifest.mn +++ b/security/jss/org/mozilla/jss/crypto/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/hclhacks/config.mk b/security/jss/org/mozilla/jss/hclhacks/config.mk index 21744eb5bf0..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/hclhacks/config.mk +++ b/security/jss/org/mozilla/jss/hclhacks/config.mk @@ -30,37 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBSECMOD) \ - $(LIBPKCS12) \ - $(LIBPKCS7) \ - $(LIBHASH) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBSECUTIL) \ - $(LIBDBM) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - -####################################################################### -# Turn off any Export Control Policy for these libraries # -####################################################################### - -POLICY = - diff --git a/security/jss/org/mozilla/jss/hclhacks/manifest.mn b/security/jss/org/mozilla/jss/hclhacks/manifest.mn index c1639b20724..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/hclhacks/manifest.mn +++ b/security/jss/org/mozilla/jss/hclhacks/manifest.mn @@ -1,49 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - -REQUIRES = nspr20 dbm security - -PRIVATE_EXPORTS = hclhacks.h \ - $(NULL) - -CSRCS = \ - secvfy.c \ - $(NULL) - -LIBRARY_NAME = jsshclhacks diff --git a/security/jss/org/mozilla/jss/hclhacks/secvfy.c b/security/jss/org/mozilla/jss/hclhacks/secvfy.c index 6e2f29aadae..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/hclhacks/secvfy.c +++ b/security/jss/org/mozilla/jss/hclhacks/secvfy.c @@ -1,382 +0,0 @@ -/* - * The contents of this file are subject to the Mozilla Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is the Netscape Security Services for Java. - * - * The Initial Developer of the Original Code is Netscape - * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998-2000 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the - * terms of the GNU General Public License Version 2 or later (the - * "GPL"), in which case the provisions of the GPL are applicable - * instead of those above. If you wish to allow use of your - * version of this file only under the terms of the GPL and not to - * allow others to use your version of this file under the MPL, - * indicate your decision by deleting the provisions above and - * replace them with the notice and other provisions required by - * the GPL. If you do not delete the provisions above, a recipient - * may use your version of this file under either the MPL or the - * GPL. - */ - -#include -#include "crypto.h" -#include "sechash.h" -#include "key.h" -#include "secasn1.h" -#include "secoid.h" -#include "pk11func.h" -#include "rsa.h" -#include "secerr.h" - -/* -** Decrypt signature block using public key (in place) -** XXX this is assuming that the signature algorithm has WITH_RSA_ENCRYPTION -*/ -static SECStatus -DecryptSigBlock(int *tagp, unsigned char *digest, SECKEYPublicKey *key, - SECItem *sig, char *wincx) -{ - SECItem it; - SGNDigestInfo *di = NULL; - unsigned char *dsig; - SECStatus rv; - SECOidTag tag; - unsigned char buf[MAX_RSA_MODULUS_LEN]; - - dsig = NULL; - it.data = buf; - it.len = sizeof(buf); - - if (key == NULL) goto loser; - - /* Decrypt signature block */ - dsig = (unsigned char*) PORT_Alloc(sig->len); - if (dsig == NULL) goto loser; - - /* decrypt the block */ - rv = PK11_VerifyRecover(key, sig, &it, wincx); - if (rv != SECSuccess) goto loser; - - di = SGN_DecodeDigestInfo(&it); - if (di == NULL) goto sigloser; - - /* - ** Finally we have the digest info; now we can extract the algorithm - ** ID and the signature block - */ - tag = SECOID_GetAlgorithmTag(&di->digestAlgorithm); - /* XXX Check that tag is an appropriate algorithm? */ - if (di->digest.len > 32) { - PORT_SetError(SEC_ERROR_OUTPUT_LEN); - goto loser; - } - PORT_Memcpy(digest, di->digest.data, di->digest.len); - *tagp = tag; - goto done; - - sigloser: - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - - loser: - rv = SECFailure; - - done: - if (di != NULL) SGN_DestroyDigestInfo(di); - if (dsig != NULL) PORT_Free(dsig); - - return rv; -} - -typedef enum { VFY_RSA, VFY_DSA} VerifyType; - -/************************************************************************/ -/************************************************************************/ -/* Above is from secvfy.c. Here's the new stuff: */ -/* Reverse-direction verification: get the signature at the end of the */ -/* digest instead of at the beginning. */ -/************************************************************************/ -/************************************************************************/ -#include "hclhacks.h" - -struct VFYContext2Str { - SECOidTag compositeAlg; - SECOidTag alg; /* hash alg */ - SECKEYPublicKey *key; - VerifyType type; - void *hashcx; - SECHashObject *hashobj; -}; - -/* - * Pulls the hash algorithm, signing algorithm, and key type out of a - * composite algorithm. - * - * alg: the composite algorithm to dissect. - * hashalg: address of a SECOidTag which will be set with the hash algorithm. - * signalg: address of a SECOidTag which will be set with the signing alg. - * keyType: address of a KeyType which will be set with the key type. - * Returns: SECSuccess if the algorithm was acceptable, SECFailure if the - * algorithm was not found or was not a signing algorithm. - */ -static SECStatus -dissectSigAlg(SECOidTag alg, SECOidTag *hashalg, SECOidTag *signalg, - KeyType *keyType) -{ - PR_ASSERT(hashalg!=NULL && signalg!=NULL && keyType!=NULL); - - switch (alg) { - /* We probably shouldn't be generating MD2 signatures either */ - case SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION: - *hashalg = SEC_OID_MD2; - *signalg = SEC_OID_PKCS1_RSA_ENCRYPTION; - *keyType = rsaKey; - return SECSuccess; - case SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION: - *hashalg = SEC_OID_MD5; - *signalg = SEC_OID_PKCS1_RSA_ENCRYPTION; - *keyType = rsaKey; - return SECSuccess; - case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION: - case SEC_OID_ISO_SHA_WITH_RSA_SIGNATURE: - *hashalg = SEC_OID_SHA1; - *signalg = SEC_OID_PKCS1_RSA_ENCRYPTION; - *keyType = rsaKey; - return SECSuccess; - /* what about normal DSA? */ - case SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST: - case SEC_OID_BOGUS_DSA_SIGNATURE_WITH_SHA1_DIGEST: - *hashalg = SEC_OID_SHA1; - *signalg = SEC_OID_ANSIX9_DSA_SIGNATURE; - *keyType = dsaKey; - return SECSuccess; - case SEC_OID_MISSI_DSS: - case SEC_OID_MISSI_KEA_DSS: - case SEC_OID_MISSI_KEA_DSS_OLD: - case SEC_OID_MISSI_DSS_OLD: - *hashalg = SEC_OID_SHA1; - *signalg = SEC_OID_MISSI_DSS; /* XXX Is there a better algid? */ - *keyType = fortezzaKey; - return SECSuccess; - /* we don't implement MD4 hashes */ - case SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION: - default: - return SECFailure; - } - PR_ASSERT(PR_FALSE); /* shouldn't get here */ -} - -/* - * algid: The composite signature algorithm, for example - * SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION. - * Returns: a new VFYContext2, or NULL if an error occurred. - */ -VFYContext2 * -VFY_CreateContext2(SECKEYPublicKey *key, SECOidTag algid) -{ - VFYContext2 *cx=NULL; - SECOidTag hashAlg; - SECOidTag sigAlg; - KeyType keyType; - - PR_ASSERT(key!=NULL); - - /* - * validate key type and hash algorithm - */ - if( dissectSigAlg(algid, &hashAlg, &sigAlg, &keyType) != SECSuccess) { - PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); - goto loser; - } - if( keyType != key->keyType ) { - /* key type of algorithm is not the type of the key that - * was passed in */ - PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); - goto loser; - } - switch(hashAlg) { - case SEC_OID_MD2: - case SEC_OID_MD5: - case SEC_OID_SHA1: - break; - default: - PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); - goto loser; - } - - /* - * Create the context - */ - cx = (VFYContext2*) PORT_ZAlloc(sizeof(VFYContext2)); - if (cx == NULL) { - PORT_SetError(SEC_ERROR_NO_MEMORY); - goto loser; - } - cx->compositeAlg = algid; - cx->alg = hashAlg; - switch(keyType) { - case rsaKey: - cx->type = VFY_RSA; - break; - case dsaKey: - case fortezzaKey: - cx->type = VFY_DSA; - break; - default: - PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); - goto loser; - } - cx->key = SECKEY_CopyPublicKey(key); - PR_ASSERT(cx->hashcx == NULL); - PR_ASSERT(cx->hashobj == NULL); - - return cx; - - loser: - if(cx) { - VFY_DestroyContext2(cx, PR_TRUE); - } - return NULL; -} - -void -VFY_DestroyContext2(VFYContext2 *cx, PRBool freeit) -{ - if (cx) { - if (cx->hashcx != NULL) { - (*cx->hashobj->destroy)(cx->hashcx, PR_TRUE); - cx->hashcx = NULL; - } - if (cx->key) { - SECKEY_DestroyPublicKey(cx->key); - } - if (freeit) { - PORT_ZFree(cx, sizeof(VFYContext2)); - } - } -} - -SECStatus -VFY_Begin2(VFYContext2 *cx) -{ - if (cx->hashcx != NULL) { - (*cx->hashobj->destroy)(cx->hashcx, PR_TRUE); - cx->hashcx = NULL; - } - - switch (cx->alg) { - case SEC_OID_MD2: - cx->hashobj = &SECHashObjects[HASH_AlgMD2]; - break; - case SEC_OID_MD5: - cx->hashobj = &SECHashObjects[HASH_AlgMD5]; - break; - case SEC_OID_SHA1: - cx->hashobj = &SECHashObjects[HASH_AlgSHA1]; - break; - default: - PORT_SetError(SEC_ERROR_INVALID_ALGORITHM); - return SECFailure; - } - - cx->hashcx = (*cx->hashobj->create)(); - if (cx->hashcx == NULL) - return SECFailure; - - (*cx->hashobj->begin)(cx->hashcx); - return SECSuccess; -} - -SECStatus -VFY_Update2(VFYContext2 *cx, unsigned char *input, unsigned inputLen) -{ - if (cx->hashcx == NULL) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - return SECFailure; - } - (*cx->hashobj->update)(cx->hashcx, input, inputLen); - return SECSuccess; -} - - -SECStatus -VFY_End2(VFYContext2 *cx, SECItem *sig, void *wincx) -{ - unsigned char final[32]; - unsigned part; - int hashAlg; - SECItem hash, mysig; - SECItem *dsasig = NULL; - unsigned char digest[DSA_SIGNATURE_LEN]; - SECStatus status = SECFailure; - - if (cx->hashcx == NULL) { - PORT_SetError(SEC_ERROR_INVALID_ARGS); - goto finish; - } - (*cx->hashobj->end)(cx->hashcx, final, &part, sizeof(final)); - switch (cx->type) { - case VFY_DSA: - /* if this is a DER encoded signature, decode it first */ - if ((cx->compositeAlg==SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST) || - (cx->compositeAlg==SEC_OID_BOGUS_DSA_SIGNATURE_WITH_SHA1_DIGEST) || - (cx->compositeAlg==SEC_OID_ANSIX9_DSA_SIGNATURE)) { - dsasig = DSAU_DecodeDerSig(sig); - if ((dsasig == NULL) || (dsasig->len != DSA_SIGNATURE_LEN)) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - PORT_Memcpy(&digest[0], dsasig->data, dsasig->len); - } else { - if (sig->len != DSA_SIGNATURE_LEN) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - PORT_Memcpy(&digest[0], sig->data, sig->len); - } - mysig.data = digest; - mysig.len = DSA_SIGNATURE_LEN; /* magic size of dsa signature */ - hash.data = final; - hash.len = part; - if (PK11_Verify(cx->key,&mysig,&hash,wincx) != SECSuccess) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - break; - case VFY_RSA: - if( DecryptSigBlock(&hashAlg, &digest[0], cx->key, sig, wincx) - != SECSuccess) - { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - if (PORT_Memcmp(final, digest, part)) { - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - break; - default: - PR_ASSERT(PR_FALSE); /* shouldn't happen */ - PORT_SetError(SEC_ERROR_BAD_SIGNATURE); - goto finish; - } - status = SECSuccess; - -finish: - if (dsasig != NULL) { - SECITEM_FreeItem(dsasig, PR_TRUE); - } - return status; -} diff --git a/security/jss/org/mozilla/jss/manage/CryptoManager.c b/security/jss/org/mozilla/jss/manage/CryptoManager.c index 4ee12347bdb..6301b4912d7 100644 --- a/security/jss/org/mozilla/jss/manage/CryptoManager.c +++ b/security/jss/org/mozilla/jss/manage/CryptoManager.c @@ -32,7 +32,6 @@ */ #include "_jni/org_mozilla_jss_CryptoManager.h" -#include #include #include #include @@ -44,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -51,7 +52,6 @@ #include "jssinit.h" #include "pk11util.h" -#include "Policy.h" #if defined(AIX) || defined(HPUX) || defined(LINUX) #include @@ -78,26 +78,6 @@ makePWCBInfo(JNIEnv *env, PK11SlotInfo *slot); static char* getPWFromCallback(PK11SlotInfo *slot, PRBool retry, void *arg); -static jint -getPolicyTypeIndex( SVRPLCYPolicyType thisPolicy ); - -/*********************************************************************** -** -** Policy Type indices. This must be kept in sync with the policy -** type indices in the CryptoManager class. -**/ - -#define NUM_POLICIES 4 - -SVRPLCYPolicyType JSS_PolicyTable[NUM_POLICIES] = { -/* 0 */ { SVRPLCYNull }, -/* 1 */ { SVRPLCYDomestic }, -/* 2 */ { SVRPLCYExport }, -/* 3 */ { SVRPLCYFrance } - -/* REMEMBER TO UPDATE NUM_POLICIES!!! */ -}; - /************************************************************* * AIX, HP, and Linux signal handling madness * @@ -293,30 +273,7 @@ simpleInitialize(JNIEnv *env) PR_SetConcurrency( concurrency ); RNG_RNGInit(); - - /* establish a Utility policy */ - if( SVRPLCY_InstallUtilityPolicy() != PR_SUCCESS ) { - JSS_throwMsg(env, SECURITY_EXCEPTION, - "Failed to install utility policy"); - return PR_FAILURE; - } - - /* establish an SSL policy */ - SVRPLCY_InstallSSLPolicy(); - - /* establish a JSS policy */ - if( SVRPLCY_InstallJSSPolicy() != PR_SUCCESS ) { - JSS_throwMsg(env, SECURITY_EXCEPTION, - "Failed to install JSS policy"); - return PR_FAILURE; - } - - /* establish JSS max key sizes */ - if( JSS_InstallMaxKeySizesAllowed() != PR_SUCCESS ) { - JSS_throwMsg(env, SECURITY_EXCEPTION, - "Failed to install max JSS key sizes"); - return PR_FAILURE; - } + RNG_SystemInfoForRNG(); initialized = PR_TRUE; @@ -754,7 +711,7 @@ getPWFromCallback(PK11SlotInfo *slot, PRBool retry, void *arg) } /* Get the JNI environment */ - if( (*javaVM)->AttachCurrentThread(javaVM, &env, NULL) != 0) { + if( (*javaVM)->AttachCurrentThread(javaVM, (void**)&env, NULL) != 0) { PR_ASSERT(PR_FALSE); goto finish; } @@ -1073,67 +1030,6 @@ Java_org_mozilla_jss_CryptoManager_FIPSEnabled(JNIEnv *env, jobject this) } } -/*********************************************************************** - * CryptoManager.isDomestic - * - * Returns true if this build of jssjava is "domestic", false otherwise. - */ -JNIEXPORT jboolean JNICALL -Java_org_mozilla_jss_CryptoManager_isDomestic(JNIEnv *env, jobject this) -{ - /* "C" data members */ - PRBool result; - - result = JSS_isDomestic(); - - /* Return a java boolean */ - if( result != PR_TRUE ) { - return JNI_FALSE; - } - - return JNI_TRUE; -} - -/*********************************************************************** - * CryptoManager.getPolicyTypeIndex - * - * Input export control policy from embedded utility policy table. - * - * Returns the index where the policy is stored in the JSS_PolicyTable[]. - */ -static jint -getPolicyTypeIndex( SVRPLCYPolicyType thisPolicy ) -{ - jint i; - - for( i = 0; i < NUM_POLICIES; i++ ) { - if( thisPolicy == JSS_PolicyTable[i] ) { - return i; - } - }; - - return( -1 ); -} - -/*********************************************************************** - * CryptoManager.getExportControlPolicyType - * - * Returns an integer related to the export control policy type - */ -JNIEXPORT jint JNICALL -Java_org_mozilla_jss_CryptoManager_getExportControlPolicyType( JNIEnv *env, - jobject this ) -{ - /* "C" data members */ - SVRPLCYPolicyType policy; - - /* Get the export control policy from the embedded utility policy table */ - policy = JSS_getExportControlPolicyType(); - - /* Return a java int */ - return( getPolicyTypeIndex( policy ) ); -} - /*********************************************************************** * DatabaseCloser.closeDatabases * diff --git a/security/jss/org/mozilla/jss/manage/CryptoManager.java b/security/jss/org/mozilla/jss/manage/CryptoManager.java index 09c0033d867..5ac672a7e74 100644 --- a/security/jss/org/mozilla/jss/manage/CryptoManager.java +++ b/security/jss/org/mozilla/jss/manage/CryptoManager.java @@ -51,7 +51,7 @@ import org.mozilla.jss.CRLImportException; * Initialization is done with static methods, and must be done before * an instance can be created. All other operations are done with instance * methods. - * @version $Revision: 1.2 $ $Date: 2000-12-19 06:18:01 $ + * @version $Revision: 1.3 $ $Date: 2001-01-16 23:49:19 $ */ public final class CryptoManager implements TokenSupplier { @@ -174,7 +174,7 @@ public final class CryptoManager implements TokenSupplier //////////////////////////////////////////////////////////////////// /** * Returns the Manufacturer ID of the internal PKCS #11 module. - *

The default is "Netscape Communications Corp ". + *

The default is "mozilla.org ". */ public String getManufacturerID() { return manufacturerID; } @@ -192,7 +192,7 @@ public final class CryptoManager implements TokenSupplier manufacturerID = s; } private String manufacturerID = - "Netscape Communications Corp "; + "mozilla.org "; //////////////////////////////////////////////////////////////////// // Library Description @@ -282,7 +282,7 @@ public final class CryptoManager implements TokenSupplier //////////////////////////////////////////////////////////////////// /** * Returns the description of the internal PKCS #11 slot. - *

The default is "Netscape Internal Cryptographic Services ". + *

The default is "NSS Internal Cryptographic Services ". */ public String getInternalSlotDescription() { return internalSlotDescription; @@ -304,14 +304,14 @@ public final class CryptoManager implements TokenSupplier internalSlotDescription = s; } private String internalSlotDescription = - "Netscape Internal Cryptographic Services "; + "NSS Internal Cryptographic Services "; //////////////////////////////////////////////////////////////////// // Internal Key Storage Slot Description //////////////////////////////////////////////////////////////////// /** * Returns the description of the internal PKCS #11 key storage slot. - *

The default is "Netscape Internal Private Key and Certificate Storage ". + *

The default is "NSS Internal Private Key and Certificate Storage ". */ public String getInternalKeyStorageSlotDescription() { @@ -334,14 +334,14 @@ public final class CryptoManager implements TokenSupplier internalKeyStorageSlotDescription = s; } private String internalKeyStorageSlotDescription = - "Netscape Internal Private Key and Certificate Storage "; + "NSS Internal Private Key and Certificate Storage "; //////////////////////////////////////////////////////////////////// // FIPS Slot Description //////////////////////////////////////////////////////////////////// /** * Returns the description of the internal PKCS #11 FIPS slot. - *

The default is "Netscape Internal FIPS-140-1 Cryptographic Services ". + *

The default is "NSS Internal FIPS-140-1 Cryptographic Services ". */ public String getFIPSSlotDescription() { return FIPSSlotDescription; @@ -363,7 +363,7 @@ public final class CryptoManager implements TokenSupplier FIPSSlotDescription = s; } private String FIPSSlotDescription = - "Netscape Internal FIPS-140-1 Cryptographic Services "; + "NSS Internal FIPS-140-1 Cryptographic Services "; //////////////////////////////////////////////////////////////////// // FIPS Key Storage Slot Description @@ -371,7 +371,7 @@ public final class CryptoManager implements TokenSupplier /** * Returns the description of the internal PKCS #11 FIPS * Key Storage slot. - *

The default is "Netscape Internal FIPS-140-1 Private Key and Certificate Storage ". + *

The default is "NSS Internal FIPS-140-1 Private Key and Certificate Storage ". */ public String getFIPSKeyStorageSlotDescription() { return FIPSKeyStorageSlotDescription; @@ -393,7 +393,7 @@ public final class CryptoManager implements TokenSupplier FIPSKeyStorageSlotDescription = s; } private String FIPSKeyStorageSlotDescription = - "Netscape Internal FIPS-140-1 Private Key and Certificate Storage "; + "NSS Internal FIPS-140-1 Private Key and Certificate Storage "; /** * To have NSS check the OCSP responder for when verifying @@ -434,7 +434,7 @@ public final class CryptoManager implements TokenSupplier /** * Retrieves the internal cryptographic services token. This is the - * token built into the Netscape Security Library that performs bulk + * token built into NSS that performs bulk * cryptographic operations. *

In FIPS mode, the internal cryptographic services token is the * same as the internal key storage token. @@ -447,7 +447,7 @@ public final class CryptoManager implements TokenSupplier /** * Retrieves the internal key storage token. This is the token - * provided by the Netscape Security Library to store private keys. + * provided by NSS to store private keys. * The keys stored in this token are stored in an encrypted key database. *

In FIPS mode, the internal key storage token is the same as * the internal cryptographic services token. @@ -527,8 +527,8 @@ public final class CryptoManager implements TokenSupplier } /** - * Retrieves all tokens except those built into the Netscape Security - * Library. This excludes the internal token and the internal + * Retrieves all tokens except those built into NSS. + * This excludes the internal token and the internal * key storage token (which are one and the same in FIPS mode). * * @return All tokens accessible from JSS, except for the built-in @@ -678,24 +678,6 @@ public final class CryptoManager implements TokenSupplier */ public synchronized native boolean FIPSEnabled(); - /////////////////////////////////////////////////////////////////////// - // Export Control Policy management - /////////////////////////////////////////////////////////////////////// - - /** - * Determines whether this build of jssjava is "domestic". - * - * @return true if jssjava is "domestic", false otherwise. - */ - public synchronized native boolean isDomestic(); - - /** - * Determines what policy this build of jssjava contains. - * - * @return the policy type of this jssjava executable. - */ - public synchronized native int getExportControlPolicyType(); - /////////////////////////////////////////////////////////////////////// // Password Callback management /////////////////////////////////////////////////////////////////////// @@ -838,7 +820,7 @@ public final class CryptoManager implements TokenSupplier 1); if(position==-11) { Debug.trace(Debug.ERROR, - "Unable to install Netscape provider"); + "Unable to install default provider"); } } @@ -1244,8 +1226,7 @@ public final class CryptoManager implements TokenSupplier /** * Retrieves a FIPS-140-1 validated random number generator. * - * @return A JSS SecureRandom implemented with the FIPS-validated - * Netscape security library. + * @return A JSS SecureRandom implemented with FIPS-validated NSS. */ public org.mozilla.jss.crypto.JSSSecureRandom createPseudoRandomNumberGenerator() @@ -1256,8 +1237,7 @@ public final class CryptoManager implements TokenSupplier /** * Retrieves a FIPS-140-1 validated random number generator. * - * @return A JSS SecureRandom implemented with the FIPS-validated - * Netscape security library. + * @return A JSS SecureRandom implemented with FIPS-validated NSS. */ public org.mozilla.jss.crypto.JSSSecureRandom getSecureRNG() { diff --git a/security/jss/org/mozilla/jss/manage/NSSInit.java b/security/jss/org/mozilla/jss/manage/NSSInit.java index 9bd093a5dbd..528fc05d3ee 100644 --- a/security/jss/org/mozilla/jss/manage/NSSInit.java +++ b/security/jss/org/mozilla/jss/manage/NSSInit.java @@ -139,14 +139,14 @@ public final class NSSInit { keyDBName, certDBName, true, // readOnly - "Netscape Communications Corp ", + "mozilla.org ", "Internal Crypto Services ", "Internal Crypto Services Token ", "Internal Key Storage Token ", - "Netscape Internal Cryptographic Services ", - "Netscape Internal Private Key and Certificate Storage ", - "Netscape Internal FIPS-140-1 Cryptographic Services ", - "Netscape Internal FIPS-140-1 Private Key and Certificate Storage "); + "NSS Internal Cryptographic Services ", + "NSS Internal Private Key and Certificate Storage ", + "NSS Internal FIPS-140-1 Cryptographic Services ", + "NSS Internal FIPS-140-1 Private Key and Certificate Storage "); setPasswordCallback( new ConsolePasswordCallback() ); mNSSInitialized = true; diff --git a/security/jss/org/mozilla/jss/manage/PK11Finder.c b/security/jss/org/mozilla/jss/manage/PK11Finder.c index 8d9007ad19e..5af9346e721 100644 --- a/security/jss/org/mozilla/jss/manage/PK11Finder.c +++ b/security/jss/org/mozilla/jss/manage/PK11Finder.c @@ -902,7 +902,6 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative jobject leafObject=NULL; CERTIssuerAndSN *issuerAndSN; PLArenaPool *arena=NULL; - int root_cert = -1; /*************************************************** * Validate arguments @@ -1106,7 +1105,6 @@ Java_org_mozilla_jss_CryptoManager_importCertPackageNative * Now add the rest of the certs (which should all be CAs) ***************************************************/ if( numCerts-userCertFound>= 1 ) { - SECCertUsage usage; if (certi == 0) { status = ImportCAChain(derCerts+userCertFound, @@ -1783,8 +1781,6 @@ Java_org_mozilla_jss_CryptoManager_importCRLNative { CERTCertDBHandle *certdb = CERT_GetDefaultCertDB(); - jbyte *packageBytes=NULL; - jsize packageLen; CERTSignedCrl *crl = NULL; SECItem *packageItem = NULL; int status = SECFailure; diff --git a/security/jss/org/mozilla/jss/manage/config.mk b/security/jss/org/mozilla/jss/manage/config.mk index bb088a7f0ca..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/manage/config.mk +++ b/security/jss/org/mozilla/jss/manage/config.mk @@ -30,43 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBSVRPLCY) \ - $(LIBJSSPOLICY) \ - $(LIBJSSPKCS11) \ - $(LIBJSSCRYPTO) \ - $(LIBJSSUTIL) \ - $(LIBJSSHCLHACKS) \ - $(LIBPKCS7) \ - $(LIBSSL) \ - $(LIBSECMOD) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBHASH) \ - $(LIBSECUTIL) \ - $(LIBDBM) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(JAVA_LIBS) $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += $(JAVA_LIBS) -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - -####################################################################### -# Turn off any Export Control Policy for these libraries # -####################################################################### - -POLICY = - diff --git a/security/jss/org/mozilla/jss/manage/jssinit.h b/security/jss/org/mozilla/jss/manage/jssinit.h index e65fb3f0467..83cec663e8c 100644 --- a/security/jss/org/mozilla/jss/manage/jssinit.h +++ b/security/jss/org/mozilla/jss/manage/jssinit.h @@ -34,7 +34,6 @@ #include #include */ -#include "svrplcy.h" #ifndef JSS_INIT_H #define JSS_INIT_H @@ -75,21 +74,4 @@ JSS_completeInitialize(JNIEnv *env, PR_EXTERN( void ) JSS_setPasswordCallback(JNIEnv *env, jobject callback); - -/*********************************************************************** - * JSS_isDomestic - * - * Returns true if this build of jssjava is "domestic", false otherwise. - */ -PR_EXTERN( PRBool ) -JSS_isDomestic( void ); - -/*********************************************************************** - * JSS_getExportControlPolicyType - * - * Returns the export control policy type - */ -PR_EXTERN( SVRPLCYPolicyType ) -JSS_getExportControlPolicyType( void ); - #endif diff --git a/security/jss/org/mozilla/jss/manage/manifest.mn b/security/jss/org/mozilla/jss/manage/manifest.mn index cebe47d0258..fcc3b51c3b5 100644 --- a/security/jss/org/mozilla/jss/manage/manifest.mn +++ b/security/jss/org/mozilla/jss/manage/manifest.mn @@ -32,7 +32,7 @@ # CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/pkcs10/CertificationRequest.java b/security/jss/org/mozilla/jss/pkcs10/CertificationRequest.java index 39259dbabd9..492f0f803f7 100644 --- a/security/jss/org/mozilla/jss/pkcs10/CertificationRequest.java +++ b/security/jss/org/mozilla/jss/pkcs10/CertificationRequest.java @@ -313,7 +313,7 @@ public class CertificationRequest implements ASN1Value { // make new Name Name name = new Name(); - name.addCommonName("asldkj\u00dsdlkfj\u00e"); + name.addCommonName("asldkj"); name.addCountryName("US"); name.addOrganizationName("Some Corp"); name.addOrganizationalUnitName("Some Org Unit"); diff --git a/security/jss/org/mozilla/jss/pkcs10/manifest.mn b/security/jss/org/mozilla/jss/pkcs10/manifest.mn index b2aa94af322..512bc7d2b51 100644 --- a/security/jss/org/mozilla/jss/pkcs10/manifest.mn +++ b/security/jss/org/mozilla/jss/pkcs10/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/pkcs11/PK11KeyGenerator.c b/security/jss/org/mozilla/jss/pkcs11/PK11KeyGenerator.c index e7466ab8b16..5b3fc7c2aa1 100644 --- a/security/jss/org/mozilla/jss/pkcs11/PK11KeyGenerator.c +++ b/security/jss/org/mozilla/jss/pkcs11/PK11KeyGenerator.c @@ -45,6 +45,8 @@ #include #include #include +#include +#include #define HCLHACK #ifdef HCLHACK diff --git a/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c b/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c index d65d9f16905..5666b40952f 100644 --- a/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c +++ b/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c @@ -35,9 +35,9 @@ #include #include -#include #include #include +#include #include #include diff --git a/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c b/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c index 990ae0ee410..203ab52add1 100644 --- a/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c +++ b/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c @@ -39,7 +39,6 @@ #include #include #include -#include /* JSS includes */ #include diff --git a/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c b/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c index 437e19b5514..b2b7fc30a61 100644 --- a/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c +++ b/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c @@ -39,8 +39,9 @@ #include "_jni/org_mozilla_jss_pkcs11_PK11Signature.h" #include "_jni/org_mozilla_jss_pkcs11_SigContextProxy.h" #include -#include #include +#include +#include #include #include diff --git a/security/jss/org/mozilla/jss/pkcs11/PK11Token.c b/security/jss/org/mozilla/jss/pkcs11/PK11Token.c index 739cf59a030..353fda78e86 100644 --- a/security/jss/org/mozilla/jss/pkcs11/PK11Token.c +++ b/security/jss/org/mozilla/jss/pkcs11/PK11Token.c @@ -40,16 +40,16 @@ #include #include #include -#include #include #include +#include +#include #include #include #include #include -#include #include #include "java_ids.h" @@ -958,7 +958,6 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_jss_pkcs11_PK11Token_generatePK10 unsigned char *b64request; SECItem p, q, g; PQGParams *dsaParams=NULL; - jobject keyPair=NULL; const char* c_keyType; jboolean k_isCopy; unsigned int ktype = 0; @@ -1064,7 +1063,6 @@ GenerateCertRequest(JNIEnv *env, SECKEYPrivateKey *privk = NULL; SECKEYPublicKey *pubk = NULL; - int i = 0; SECStatus rv; PRArenaPool *arena; SECItem result_der, result; diff --git a/security/jss/org/mozilla/jss/pkcs11/config.mk b/security/jss/org/mozilla/jss/pkcs11/config.mk index 7f5a19fa3d3..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/pkcs11/config.mk +++ b/security/jss/org/mozilla/jss/pkcs11/config.mk @@ -30,40 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBJSSCRYPTO) \ - $(LIBJSSUTIL) \ - $(LIBJSSPOLICY) \ - $(LIBJSSHCLHACKS) \ - $(LIBSECMOD) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBHASH) \ - $(LIBSECUTIL) \ - $(LIBDBM) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - - -####################################################################### -# Turn off any Export Control Policy for these libraries # -####################################################################### - -POLICY = - diff --git a/security/jss/org/mozilla/jss/pkcs11/manifest.mn b/security/jss/org/mozilla/jss/pkcs11/manifest.mn index e79965c145b..75860b19150 100644 --- a/security/jss/org/mozilla/jss/pkcs11/manifest.mn +++ b/security/jss/org/mozilla/jss/pkcs11/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 @@ -45,7 +45,6 @@ PACKAGE = org/mozilla/jss/pkcs11 PRIVATE_EXPORTS = pk11util.h \ secmodi.h \ secmodti.h \ - rsa.h \ $(NULL) JNI_GEN = \ diff --git a/security/jss/org/mozilla/jss/pkcs12/config.mk b/security/jss/org/mozilla/jss/pkcs12/config.mk index efdc02d6022..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/pkcs12/config.mk +++ b/security/jss/org/mozilla/jss/pkcs12/config.mk @@ -30,65 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Adjust specific variables for all platforms # -####################################################################### - -ifndef BUILD_OPT - ifdef LIBRARY_NAME - ifeq ($(OS_ARCH), WINNT) - ifeq ($(OS_TARGET), WIN16) - SHARED_LIBRARY_G = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16_g.dll - IMPORT_LIBRARY_G = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)16_g.lib - else - SHARED_LIBRARY_G = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32_g.dll - IMPORT_LIBRARY_G = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)32_g.lib - endif - else - ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) - SHARED_LIBRARY_G = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr_g.a - else - SHARED_LIBRARY_G = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_g.$(DLL_SUFFIX) - endif - ifdef HAVE_PURIFY - ifdef DSO_BACKEND - PURE_LIBRARY_G = $(OBJDIR)/purelib$(LIBRARY_NAME)$(LIBRARY_VERSION)_g.$(DLL_SUFFIX) - endif - endif - endif - endif -endif - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBJSSPKCS11) \ - $(LIBJSSHCLHACKS) \ - $(LIBJSSCRYPTO) \ - $(LIBJSSUTIL) \ - $(LIBJSSPOLICY) \ - $(LIBSECMOD) \ - $(LIBPKCS12) \ - $(LIBPKCS7) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBHASH) \ - $(LIBSECUTIL) \ - $(LIBDBM) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - diff --git a/security/jss/org/mozilla/jss/pkcs12/manifest.mn b/security/jss/org/mozilla/jss/pkcs12/manifest.mn index e01e0d7aedd..16afbffb44e 100644 --- a/security/jss/org/mozilla/jss/pkcs12/manifest.mn +++ b/security/jss/org/mozilla/jss/pkcs12/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/pkcs7/manifest.mn b/security/jss/org/mozilla/jss/pkcs7/manifest.mn index 442dc5ec714..2acc7a4f5f7 100644 --- a/security/jss/org/mozilla/jss/pkcs7/manifest.mn +++ b/security/jss/org/mozilla/jss/pkcs7/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/pkix/cert/manifest.mn b/security/jss/org/mozilla/jss/pkix/cert/manifest.mn index 80c81fd4c11..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/cert/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/cert/manifest.mn @@ -1,71 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - -PACKAGE = org/mozilla/jss/pkix/cert - -# These are meant to be used within Ninja only. -PRIVATE_EXPORTS = \ - $(NULL) - -JNI_GEN = \ - $(NULL) - -CLASSES = \ - Certificate \ - CertificateInfo \ - Extension \ - SubjectKeyIdentifier \ - $(NULL) - -PRIVATE_CLASSES = \ - $(NULL) - - -JSRCS = \ - Certificate.java \ - CertificateInfo.java \ - Extension.java \ - SubjectKeyIdentifier.java \ - $(NULL) - -PRIVATE_JSRCS = - - -CSRCS = \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/pkix/cmc/manifest.mn b/security/jss/org/mozilla/jss/pkix/cmc/manifest.mn index ce2d3634826..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/cmc/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/cmc/manifest.mn @@ -1,66 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - - -PACKAGE = org/mozilla/jss/pkix/cmc - - -CLASSES = \ - PKIData \ - TaggedCertificationRequest \ - TaggedRequest \ - ResponseBody \ - TaggedAttribute \ - CMCStatusInfo \ - PendInfo \ - OtherInfo \ - $(NULL) - - - -JSRCS = \ - PKIData.java \ - TaggedCertificationRequest.java \ - TaggedRequest.java \ - ResponseBody.java \ - TaggedAttribute.java \ - CMCStatusInfo.java \ - PendInfo.java \ - OtherInfo.java \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/pkix/cmmf/manifest.mn b/security/jss/org/mozilla/jss/pkix/cmmf/manifest.mn index f9d36e1682a..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/cmmf/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/cmmf/manifest.mn @@ -1,77 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - -PACKAGE = org/mozilla/jss/pkix/cmmf - -# These are meant to be used within Ninja only. -PRIVATE_EXPORTS = \ - $(NULL) - -JNI_GEN = \ - $(NULL) - -CLASSES = \ - CertifiedKeyPair \ - CertOrEncCert \ - CertRepContent \ - CertResponse \ - GetCRL \ - IssuerAndSubject \ - PKIStatusInfo \ - RevRepContent \ - RevRequest \ - $(NULL) - -PRIVATE_CLASSES = \ - $(NULL) - - -JSRCS = \ - CertifiedKeyPair.java \ - CertOrEncCert.java \ - CertRepContent.java \ - CertResponse.java \ - GetCRL.java \ - IssuerAndSubject.java \ - PKIStatusInfo.java \ - RevRepContent.java \ - RevRequest.java \ - $(NULL) - -PRIVATE_JSRCS = diff --git a/security/jss/org/mozilla/jss/pkix/cms/manifest.mn b/security/jss/org/mozilla/jss/pkix/cms/manifest.mn index 43a3b38be54..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/cms/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/cms/manifest.mn @@ -1,76 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - - -PACKAGE = org/mozilla/jss/pkix/cms - - -CLASSES = \ - EncapsulatedContentInfo \ - ContentInfo \ - DigestedData \ - DigestInfo \ - EncryptedContentInfo \ - EncryptedData \ - EnvelopedData \ - IssuerAndSerialNumber \ - RecipientInfo \ - SignedAndEnvelopedData \ - SignedData \ - SignerInfo \ - SignerIdentifier \ - $(NULL) - - - -JSRCS = \ - EncapsulatedContentInfo.java \ - ContentInfo.java \ - DigestedData.java \ - DigestInfo.java \ - EncryptedContentInfo.java \ - EncryptedData.java \ - EnvelopedData.java \ - IssuerAndSerialNumber.java \ - RecipientInfo.java \ - SignedAndEnvelopedData.java \ - SignedData.java \ - SignerInfo.java \ - SignerIdentifier.java \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/pkix/crmf/manifest.mn b/security/jss/org/mozilla/jss/pkix/crmf/manifest.mn index a25d046faee..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/crmf/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/crmf/manifest.mn @@ -1,89 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - -PACKAGE = org/mozilla/jss/pkix/crmf - -# These are meant to be used within Ninja only. -PRIVATE_EXPORTS = \ - $(NULL) - -JNI_GEN = \ - $(NULL) - -CLASSES = \ - CertId \ - CertReqMsg \ - CertRequest \ - CertTemplate \ - Control \ - EncryptedKey \ - EncryptedValue \ - PKIArchiveOptions \ - PKIPublicationInfo \ - POPOPrivKey \ - POPOSigningKey \ - ProofOfPossession \ - ChallengeResponseException \ - $(NULL) - -PRIVATE_CLASSES = \ - $(NULL) - - -JSRCS = \ - CertId.java \ - CertRequest.java \ - CertReqMsg.java \ - CertTemplate.java \ - Control.java \ - EncryptedKey.java \ - EncryptedValue.java \ - PKIArchiveOptions.java \ - PKIPublicationInfo.java \ - POPOPrivKey.java \ - POPOSigningKey.java \ - ProofOfPossession.java \ - ChallengeResponseException.java \ - $(NULL) - -PRIVATE_JSRCS = - - -CSRCS = \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/pkix/manifest.mn b/security/jss/org/mozilla/jss/pkix/manifest.mn index 3b6c3a3971f..3b3005e6921 100644 --- a/security/jss/org/mozilla/jss/pkix/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/pkix/primitive/manifest.mn b/security/jss/org/mozilla/jss/pkix/primitive/manifest.mn index aa5cceb3a4f..e69de29bb2d 100644 --- a/security/jss/org/mozilla/jss/pkix/primitive/manifest.mn +++ b/security/jss/org/mozilla/jss/pkix/primitive/manifest.mn @@ -1,85 +0,0 @@ -# -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape Security Services for Java. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (C) 1998-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. -# - -CORE_DEPTH = ../../../../../.. - -MODULE = ninja - -NS_USE_JDK = 1 - -PACKAGE = org/mozilla/jss/pkix/primitive - -# These are meant to be used within Ninja only. -PRIVATE_EXPORTS = \ - $(NULL) - -JNI_GEN = \ - $(NULL) - -CLASSES = \ - AlgorithmIdentifier \ - Attribute \ - AVA \ - DirectoryString \ - EncryptedPrivateKeyInfo \ - Name \ - PBEParameter \ - PrivateKeyInfo \ - RDN \ - SubjectPublicKeyInfo \ - TooFewElementsException \ - $(NULL) - -PRIVATE_CLASSES = \ - $(NULL) - - -JSRCS = \ - AlgorithmIdentifier.java \ - Attribute.java \ - AVA.java \ - DirectoryString.java \ - EncryptedPrivateKeyInfo.java \ - Name.java \ - PBEParameter.java \ - PrivateKeyInfo.java \ - RDN.java \ - SubjectPublicKeyInfo.java \ - TooFewElementsException.java \ - $(NULL) - -PRIVATE_JSRCS = - - -CSRCS = \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/provider/manifest.mn b/security/jss/org/mozilla/jss/provider/manifest.mn index 01941f56312..abd10d64bc2 100644 --- a/security/jss/org/mozilla/jss/provider/manifest.mn +++ b/security/jss/org/mozilla/jss/provider/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 diff --git a/security/jss/org/mozilla/jss/tests/TestExportControlPolicy.java b/security/jss/org/mozilla/jss/tests/TestExportControlPolicy.java deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/security/jss/org/mozilla/jss/tests/config.mk b/security/jss/org/mozilla/jss/tests/config.mk index b7d50a24d7a..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/tests/config.mk +++ b/security/jss/org/mozilla/jss/tests/config.mk @@ -30,23 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Adjust specific variables for all platforms # -####################################################################### - -LD_LIBS += \ - $(LIBSECMOD) \ - $(LIBCERT) \ - $(LIBKEY) \ - $(LIBCRYPTO) \ - $(LIBHASH) \ - $(LIBPLDS) \ - $(LIBSECUTIL) \ - $(LIBPR) \ - $(LIBDBM) \ - $(LIBPLC) \ - $(LIBSYSTEM) \ - $(LIBJSSUTIL) \ - $(LIBJSSPKCS11) \ - $(NULL) diff --git a/security/jss/org/mozilla/jss/tests/manifest.mn b/security/jss/org/mozilla/jss/tests/manifest.mn index 2f1a8291ee5..fc44b6392b8 100644 --- a/security/jss/org/mozilla/jss/tests/manifest.mn +++ b/security/jss/org/mozilla/jss/tests/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1 @@ -47,9 +47,7 @@ PRIVATE_CLASSES = \ JCASigTest \ CloseDBs \ KeyWrapping \ - TestExportControlPolicy \ ListCerts \ - socketTest \ $(NULL) JSRCS = \ @@ -60,7 +58,5 @@ JSRCS = \ JCASigTest.java \ CloseDBs.java \ KeyWrapping.java \ - TestExportControlPolicy.java \ ListCerts.java \ - socketTest.java \ $(NULL) diff --git a/security/jss/org/mozilla/jss/util/config.mk b/security/jss/org/mozilla/jss/util/config.mk index 948f177baf1..3397cddea3c 100644 --- a/security/jss/org/mozilla/jss/util/config.mk +++ b/security/jss/org/mozilla/jss/util/config.mk @@ -30,29 +30,3 @@ # may use your version of this file under either the MPL or the # GPL. # - -####################################################################### -# Set the LD_LIBS value to encompass all static JSS, security, and # -# dbm libraries # -####################################################################### - -LD_LIBS += $(LIBSECUTIL) \ - $(NULL) - -####################################################################### -# Append additional LD_LIBS value to encompass all dynamic NSPR 2.0, # -# java, and system libraries # -####################################################################### - -ifeq ($(OS_ARCH), WINNT) - LD_LIBS += $(DLLPLDS) $(DLLPLC) $(DLLPR) $(DLLSYSTEM) -else - LD_LIBS += -L$(SOURCE_LIB_DIR) -lplds3 -lplc3 -lnspr3 $(DLLSYSTEM) -endif - -####################################################################### -# Turn off any Export Control Policy for these libraries # -####################################################################### - -POLICY = - diff --git a/security/jss/org/mozilla/jss/util/jssutil.c b/security/jss/org/mozilla/jss/util/jssutil.c index b9049742af5..99b6fbcc12c 100644 --- a/security/jss/org/mozilla/jss/util/jssutil.c +++ b/security/jss/org/mozilla/jss/util/jssutil.c @@ -38,7 +38,7 @@ #include #include "jssutil.h" #include "jss_bigint.h" -#include +#include "jss_exceptions.h" #include "java_ids.h" #include "_jni/org_mozilla_jss_util_Password.h" diff --git a/security/jss/org/mozilla/jss/util/manifest.mn b/security/jss/org/mozilla/jss/util/manifest.mn index 926d0dd8e11..990f3068afc 100644 --- a/security/jss/org/mozilla/jss/util/manifest.mn +++ b/security/jss/org/mozilla/jss/util/manifest.mn @@ -33,7 +33,7 @@ CORE_DEPTH = ../../../../.. -MODULE = ninja +MODULE = jss NS_USE_JDK = 1