diff options
author | admiyo <admiyo@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-11-04 19:48:54 +0000 |
---|---|---|
committer | admiyo <admiyo@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2011-11-04 19:48:54 +0000 |
commit | 4f97d6f686b00237d06bd34c70f8cad5abbff74d (patch) | |
tree | 29f460096a3e1db43ae16e8b1c6713d6047d15dc /pki/base/java-tools/src/com/netscape/cmstools | |
parent | 5b4ff55e683c897a7b48fed2717bb0e7e7049b21 (diff) | |
download | pki-4f97d6f686b00237d06bd34c70f8cad5abbff74d.tar.gz pki-4f97d6f686b00237d06bd34c70f8cad5abbff74d.tar.xz pki-4f97d6f686b00237d06bd34c70f8cad5abbff74d.zip |
Cleanup imports
Automated changes done by Eclipse
Minor tweak to one file where Eclipse was tring to find an import for Any
Due to finding it in an annotated comment.
https://bugzilla.redhat.com/show_bug.cgi?id=728303
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2292 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/java-tools/src/com/netscape/cmstools')
22 files changed, 487 insertions, 335 deletions
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/AtoB.java b/pki/base/java-tools/src/com/netscape/cmstools/AtoB.java index bdeaee273..78c207515 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/AtoB.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/AtoB.java @@ -18,7 +18,13 @@ package com.netscape.cmstools; -import java.io.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java b/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java index 66a6a6cd8..aa8ffe9a4 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/AuditVerify.java @@ -18,15 +18,24 @@ package com.netscape.cmstools; -import java.io.*; -import java.util.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FilenameFilter; +import java.io.IOException; +import java.security.PublicKey; +import java.security.Signature; +import java.security.interfaces.DSAPublicKey; +import java.security.interfaces.RSAPublicKey; +import java.util.StringTokenizer; +import java.util.Vector; + +import netscape.security.x509.X509CertImpl; + import org.mozilla.jss.CryptoManager; -import org.mozilla.jss.crypto.X509Certificate; import org.mozilla.jss.crypto.ObjectNotFoundException; -import org.mozilla.jss.util.Base64InputStream; -import java.security.*; -import java.security.interfaces.*; -import netscape.security.x509.X509CertImpl; +import org.mozilla.jss.crypto.X509Certificate; /** * Tool for verifying signed audit logs diff --git a/pki/base/java-tools/src/com/netscape/cmstools/BtoA.java b/pki/base/java-tools/src/com/netscape/cmstools/BtoA.java index d00fb6122..2bc96a2fd 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/BtoA.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/BtoA.java @@ -18,7 +18,10 @@ package com.netscape.cmstools; -import java.io.*; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java index 23c6547b4..7aa83dee9 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java @@ -18,34 +18,54 @@ package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.crypto.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintStream; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SignatureException; +import java.util.Date; + +import netscape.security.pkcs.PKCS10; +import netscape.security.x509.X500Name; +import netscape.security.x509.X509CertImpl; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.ANY; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.asn1.SET; +import org.mozilla.jss.crypto.CryptoStore; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; import org.mozilla.jss.crypto.DigestAlgorithm; +import org.mozilla.jss.crypto.ObjectNotFoundException; +import org.mozilla.jss.crypto.SignatureAlgorithm; import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; - -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.*; -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; +import org.mozilla.jss.pkcs10.CertificationRequest; +import org.mozilla.jss.pkix.cmc.PKIData; +import org.mozilla.jss.pkix.cmc.TaggedAttribute; +import org.mozilla.jss.pkix.cmc.TaggedCertificationRequest; +import org.mozilla.jss.pkix.cmc.TaggedRequest; +import org.mozilla.jss.pkix.cms.ContentInfo; +import org.mozilla.jss.pkix.cms.EncapsulatedContentInfo; +import org.mozilla.jss.pkix.cms.IssuerAndSerialNumber; +import org.mozilla.jss.pkix.cms.SignedData; +import org.mozilla.jss.pkix.cms.SignerIdentifier; +import org.mozilla.jss.pkix.cms.SignerInfo; +import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier; +import org.mozilla.jss.pkix.primitive.Name; +import org.mozilla.jss.util.Password; diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java index 9c5b74c05..e7a23a85a 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRequest.java @@ -18,39 +18,72 @@ package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.pkix.crmf.*; -import org.mozilla.jss.pkix.cmmf.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.PrintStream; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SignatureException; +import java.util.Date; +import java.util.StringTokenizer; + +import netscape.security.pkcs.PKCS10; +import netscape.security.x509.X500Name; +import netscape.security.x509.X509CertImpl; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.ANY; +import org.mozilla.jss.asn1.ASN1Util; +import org.mozilla.jss.asn1.BIT_STRING; +import org.mozilla.jss.asn1.ENUMERATED; +import org.mozilla.jss.asn1.GeneralizedTime; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.InvalidBERException; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.asn1.SET; +import org.mozilla.jss.asn1.UTF8String; +import org.mozilla.jss.crypto.CryptoStore; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; import org.mozilla.jss.crypto.DigestAlgorithm; +import org.mozilla.jss.crypto.ObjectNotFoundException; +import org.mozilla.jss.crypto.SignatureAlgorithm; import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; - -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.*; -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; - -import com.netscape.cmsutil.util.*; +import org.mozilla.jss.pkcs10.CertificationRequest; +import org.mozilla.jss.pkix.cmc.CMCCertId; +import org.mozilla.jss.pkix.cmc.GetCert; +import org.mozilla.jss.pkix.cmc.LraPopWitness; +import org.mozilla.jss.pkix.cmc.OtherMsg; +import org.mozilla.jss.pkix.cmc.PKIData; +import org.mozilla.jss.pkix.cmc.TaggedAttribute; +import org.mozilla.jss.pkix.cmc.TaggedCertificationRequest; +import org.mozilla.jss.pkix.cmc.TaggedRequest; +import org.mozilla.jss.pkix.cmmf.RevRequest; +import org.mozilla.jss.pkix.cms.ContentInfo; +import org.mozilla.jss.pkix.cms.EncapsulatedContentInfo; +import org.mozilla.jss.pkix.cms.IssuerAndSerialNumber; +import org.mozilla.jss.pkix.cms.SignedData; +import org.mozilla.jss.pkix.cms.SignerIdentifier; +import org.mozilla.jss.pkix.cms.SignerInfo; +import org.mozilla.jss.pkix.crmf.CertReqMsg; +import org.mozilla.jss.pkix.crmf.CertRequest; +import org.mozilla.jss.pkix.crmf.CertTemplate; +import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier; +import org.mozilla.jss.pkix.primitive.Name; +import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo; +import org.mozilla.jss.util.Password; + +import com.netscape.cmsutil.util.HMACDigest; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java index 04d3b4ddc..33fce1250 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCResponse.java @@ -17,35 +17,28 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.pkix.crmf.*; -import org.mozilla.jss.CryptoManager; -import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; -import org.mozilla.jss.crypto.DigestAlgorithm; -import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; -import java.text.*; +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +import netscape.security.util.CertPrettyPrint; +import netscape.security.x509.X509CertImpl; + +import org.mozilla.jss.asn1.ASN1Util; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.asn1.SET; +import org.mozilla.jss.pkix.cert.Certificate; +import org.mozilla.jss.pkix.cmc.CMCStatusInfo; +import org.mozilla.jss.pkix.cmc.OtherInfo; +import org.mozilla.jss.pkix.cmc.PendInfo; +import org.mozilla.jss.pkix.cmc.ResponseBody; +import org.mozilla.jss.pkix.cmc.TaggedAttribute; +import org.mozilla.jss.pkix.cms.EncapsulatedContentInfo; /** * Tool for parsing a CMC response diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java index 97d4f3551..85bdf5b1b 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCRevoke.java @@ -18,34 +18,48 @@ package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.crypto.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.io.PrintStream; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Date; + +import netscape.security.x509.X500Name; +import netscape.security.x509.X509CertImpl; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.NoSuchTokenException; +import org.mozilla.jss.asn1.ANY; +import org.mozilla.jss.asn1.ENUMERATED; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.asn1.SET; +import org.mozilla.jss.asn1.UTF8String; +import org.mozilla.jss.crypto.CryptoStore; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; import org.mozilla.jss.crypto.DigestAlgorithm; +import org.mozilla.jss.crypto.ObjectNotFoundException; +import org.mozilla.jss.crypto.SignatureAlgorithm; +import org.mozilla.jss.crypto.TokenException; import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; - -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.*; -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; +import org.mozilla.jss.pkix.cmc.PKIData; +import org.mozilla.jss.pkix.cmc.TaggedAttribute; +import org.mozilla.jss.pkix.cms.ContentInfo; +import org.mozilla.jss.pkix.cms.EncapsulatedContentInfo; +import org.mozilla.jss.pkix.cms.IssuerAndSerialNumber; +import org.mozilla.jss.pkix.cms.SignedData; +import org.mozilla.jss.pkix.cms.SignerIdentifier; +import org.mozilla.jss.pkix.cms.SignerInfo; +import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier; +import org.mozilla.jss.pkix.primitive.Name; +import org.mozilla.jss.util.Password; diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java index fafa40991..c2d221731 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/CRMFPopClient.java @@ -17,38 +17,57 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.io.*; -import java.util.Date; -import java.util.StringTokenizer; -import java.net.URL; -import java.net.URLConnection; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.io.BufferedReader; - +import java.net.URL; +import java.net.URLConnection; import java.net.URLEncoder; import java.security.KeyPair; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -import org.mozilla.jss.util.Password; +import java.util.Date; + +import netscape.security.x509.X500Name; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.ASN1Util; +import org.mozilla.jss.asn1.BIT_STRING; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.PrintableString; +import org.mozilla.jss.asn1.SEQUENCE; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.KeyPairGenerator; +import org.mozilla.jss.crypto.IVParameterSpec; +import org.mozilla.jss.crypto.KeyGenAlgorithm; +import org.mozilla.jss.crypto.KeyGenerator; import org.mozilla.jss.crypto.KeyPairAlgorithm; -import netscape.security.provider.RSAPublicKey; -import netscape.security.pkcs.PKCS10; -//import java.security.Signature; -import netscape.security.x509.X500Name; -import netscape.security.util.BigInt; -import netscape.security.x509.X500Signer; -import java.io.ByteArrayOutputStream; +import org.mozilla.jss.crypto.KeyPairGenerator; +import org.mozilla.jss.crypto.KeyWrapAlgorithm; +import org.mozilla.jss.crypto.KeyWrapper; +import org.mozilla.jss.crypto.Signature; +import org.mozilla.jss.crypto.SignatureAlgorithm; +import org.mozilla.jss.crypto.SymmetricKey; +import org.mozilla.jss.crypto.X509Certificate; +import org.mozilla.jss.pkix.crmf.CertReqMsg; +import org.mozilla.jss.pkix.crmf.CertRequest; +import org.mozilla.jss.pkix.crmf.CertTemplate; +import org.mozilla.jss.pkix.crmf.EncryptedKey; +import org.mozilla.jss.pkix.crmf.EncryptedValue; +import org.mozilla.jss.pkix.crmf.PKIArchiveOptions; +import org.mozilla.jss.pkix.crmf.POPOSigningKey; +import org.mozilla.jss.pkix.crmf.ProofOfPossession; +import org.mozilla.jss.pkix.primitive.AVA; +import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier; +import org.mozilla.jss.pkix.primitive.Name; +import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo; +import org.mozilla.jss.util.Password; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.pkix.crmf.*; -import com.netscape.cmsutil.util.*; +import com.netscape.cmsutil.util.HMACDigest; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java b/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java index 30f742c77..d92792253 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/DRMTool.java @@ -17,24 +17,53 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.io.*; -import java.lang.*; -import java.math.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.math.BigInteger; +import java.security.GeneralSecurityException; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.PublicKey; import java.security.cert.CertificateException; -import java.security.*; -import java.text.MessageFormat; import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Vector; import java.util.regex.PatternSyntaxException; -import java.util.*; + import netscape.security.provider.RSAPublicKey; -import netscape.security.util.*; -import netscape.security.x509.*; +import netscape.security.util.DerInputStream; +import netscape.security.util.DerOutputStream; +import netscape.security.util.DerValue; +import netscape.security.x509.X509CertImpl; + +import org.mozilla.jss.CertDatabaseException; import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.KeyDatabaseException; +import org.mozilla.jss.crypto.AlreadyInitializedException; +import org.mozilla.jss.crypto.CryptoToken; +import org.mozilla.jss.crypto.InvalidKeyFormatException; +import org.mozilla.jss.crypto.KeyWrapAlgorithm; +import org.mozilla.jss.crypto.KeyWrapper; +import org.mozilla.jss.crypto.ObjectNotFoundException; import org.mozilla.jss.crypto.PrivateKey; -import org.mozilla.jss.crypto.*; +import org.mozilla.jss.crypto.SymmetricKey; +import org.mozilla.jss.crypto.TokenCertificate; +import org.mozilla.jss.crypto.TokenException; +import org.mozilla.jss.crypto.X509Certificate; import org.mozilla.jss.pkcs11.PK11PubKey; import org.mozilla.jss.util.Password; -import org.mozilla.jss.*; /** * The DRMTool class is a utility program designed to operate on an LDIF file diff --git a/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java b/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java index 2e61e748b..f7f90a52c 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/ExtJoiner.java @@ -18,10 +18,11 @@ package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import netscape.security.x509.*; -import netscape.security.util.*; +import java.io.FileInputStream; +import java.io.IOException; + +import netscape.security.util.DerOutputStream; +import netscape.security.util.DerValue; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java index 4f0eb55ca..af228b9bb 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/GenExtKeyUsage.java @@ -18,10 +18,12 @@ package com.netscape.cmstools; -import java.io.*; import java.util.Vector; -import netscape.security.x509.*; -import netscape.security.util.*; + +import netscape.security.util.DerOutputStream; +import netscape.security.util.DerValue; +import netscape.security.util.ObjectIdentifier; +import netscape.security.x509.Extension; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java b/pki/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java index 3ce25778b..609132248 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/GenIssuerAltNameExt.java @@ -18,10 +18,19 @@ package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import netscape.security.x509.*; -import netscape.security.util.*; +import java.io.ByteArrayOutputStream; +import java.net.InetAddress; + +import netscape.security.util.ObjectIdentifier; +import netscape.security.x509.DNSName; +import netscape.security.x509.GeneralNameInterface; +import netscape.security.x509.GeneralNames; +import netscape.security.x509.IPAddressName; +import netscape.security.x509.IssuerAlternativeNameExtension; +import netscape.security.x509.OIDName; +import netscape.security.x509.RFC822Name; +import netscape.security.x509.URIName; +import netscape.security.x509.X500Name; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java b/pki/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java index 8d28a04e0..52fefe579 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/GenSubjectAltNameExt.java @@ -18,10 +18,19 @@ package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import netscape.security.x509.*; -import netscape.security.util.*; +import java.io.ByteArrayOutputStream; +import java.net.InetAddress; + +import netscape.security.util.ObjectIdentifier; +import netscape.security.x509.DNSName; +import netscape.security.x509.GeneralNameInterface; +import netscape.security.x509.GeneralNames; +import netscape.security.x509.IPAddressName; +import netscape.security.x509.OIDName; +import netscape.security.x509.RFC822Name; +import netscape.security.x509.SubjectAlternativeNameExtension; +import netscape.security.x509.URIName; +import netscape.security.x509.X500Name; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java b/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java index 1cfc72456..0b9d3932d 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/HttpClient.java @@ -17,28 +17,30 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import java.util.*; -import java.security.*; - -import org.mozilla.jss.*; -import org.mozilla.jss.util.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.ssl.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.CryptoManager; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.CertDatabaseException; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.pkcs11.PK11Token; - -import netscape.security.x509.X509CertImpl; -import netscape.security.x509.X509Key; -import netscape.security.x509.X500Name; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintStream; +import java.net.Socket; +import java.net.SocketException; +import java.util.StringTokenizer; -import com.netscape.cmsutil.ocsp.*; -import com.netscape.cmsutil.ocsp.Request; +import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.crypto.CryptoStore; +import org.mozilla.jss.crypto.CryptoToken; +import org.mozilla.jss.crypto.X509Certificate; +import org.mozilla.jss.ssl.SSLHandshakeCompletedEvent; +import org.mozilla.jss.ssl.SSLHandshakeCompletedListener; +import org.mozilla.jss.ssl.SSLSocket; +import org.mozilla.jss.util.Password; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java b/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java index 30e033926..df18a3e52 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/OCSPClient.java @@ -17,27 +17,44 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import java.util.*; -import java.security.*; - -import org.mozilla.jss.*; -import org.mozilla.jss.util.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.CryptoManager; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.CertDatabaseException; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.pkcs11.PK11Token; +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.Socket; +import java.security.MessageDigest; +import netscape.security.x509.X500Name; import netscape.security.x509.X509CertImpl; import netscape.security.x509.X509Key; -import netscape.security.x509.X500Name; -import com.netscape.cmsutil.ocsp.*; +import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.NULL; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.crypto.X509Certificate; +import org.mozilla.jss.pkix.primitive.AlgorithmIdentifier; + +import com.netscape.cmsutil.ocsp.BasicOCSPResponse; +import com.netscape.cmsutil.ocsp.CertID; +import com.netscape.cmsutil.ocsp.CertStatus; +import com.netscape.cmsutil.ocsp.GoodInfo; +import com.netscape.cmsutil.ocsp.OCSPRequest; +import com.netscape.cmsutil.ocsp.OCSPResponse; +import com.netscape.cmsutil.ocsp.OCSPResponseStatus; import com.netscape.cmsutil.ocsp.Request; +import com.netscape.cmsutil.ocsp.ResponseBytes; +import com.netscape.cmsutil.ocsp.ResponseData; +import com.netscape.cmsutil.ocsp.RevokedInfo; +import com.netscape.cmsutil.ocsp.SingleResponse; +import com.netscape.cmsutil.ocsp.TBSRequest; +import com.netscape.cmsutil.ocsp.UnknownInfo; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java b/pki/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java index 150fe5105..05b0acf9d 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/PKCS10Client.java @@ -17,41 +17,34 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.util.Date; -import java.util.StringTokenizer; -import java.net.URL; -import java.net.URLConnection; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.BufferedReader; import java.io.PrintStream; -import java.io.File; -import java.io.FileOutputStream; - -import java.net.URLEncoder; import java.security.KeyPair; import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import org.mozilla.jss.util.Password; + +import netscape.security.x509.X500Name; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.INTEGER; +import org.mozilla.jss.asn1.OBJECT_IDENTIFIER; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.PrintableString; +import org.mozilla.jss.asn1.SET; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.crypto.KeyPairGenerator; import org.mozilla.jss.crypto.KeyPairAlgorithm; -//import netscape.security.provider.RSAPublicKey; -import netscape.security.pkcs.PKCS10; -//import java.security.Signature; -import netscape.security.x509.X500Name; -import netscape.security.util.BigInt; -import netscape.security.x509.X500Signer; -import java.io.ByteArrayOutputStream; +import org.mozilla.jss.crypto.KeyPairGenerator; +import org.mozilla.jss.crypto.SignatureAlgorithm; +import org.mozilla.jss.pkcs10.CertificationRequest; +import org.mozilla.jss.pkcs10.CertificationRequestInfo; +import org.mozilla.jss.pkix.primitive.AVA; +import org.mozilla.jss.pkix.primitive.Attribute; +import org.mozilla.jss.pkix.primitive.Name; +import org.mozilla.jss.pkix.primitive.SubjectPublicKeyInfo; +import org.mozilla.jss.util.Password; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.pkix.crmf.*; -import com.netscape.cmsutil.util.*; +import com.netscape.cmsutil.util.HMACDigest; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java b/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java index 61058776f..38b3e162c 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/PKCS12Export.java @@ -18,40 +18,40 @@ package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.pkcs12.*; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.pkix.crmf.*; -import org.mozilla.jss.pkix.cmmf.*; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.security.MessageDigest; + import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.asn1.ASN1Util; +import org.mozilla.jss.asn1.ASN1Value; +import org.mozilla.jss.asn1.BMPString; +import org.mozilla.jss.asn1.OCTET_STRING; +import org.mozilla.jss.asn1.SEQUENCE; +import org.mozilla.jss.asn1.SET; +import org.mozilla.jss.crypto.Cipher; +import org.mozilla.jss.crypto.CryptoStore; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; -import org.mozilla.jss.crypto.DigestAlgorithm; +import org.mozilla.jss.crypto.EncryptionAlgorithm; +import org.mozilla.jss.crypto.IVParameterSpec; +import org.mozilla.jss.crypto.KeyGenAlgorithm; +import org.mozilla.jss.crypto.KeyGenerator; +import org.mozilla.jss.crypto.KeyWrapAlgorithm; +import org.mozilla.jss.crypto.KeyWrapper; +import org.mozilla.jss.crypto.PBEAlgorithm; +import org.mozilla.jss.crypto.SymmetricKey; import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; - -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.*; -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; - -import com.netscape.cmsutil.util.*; +import org.mozilla.jss.pkcs12.AuthenticatedSafes; +import org.mozilla.jss.pkcs12.CertBag; +import org.mozilla.jss.pkcs12.PFX; +import org.mozilla.jss.pkcs12.PasswordConverter; +import org.mozilla.jss.pkcs12.SafeBag; +import org.mozilla.jss.pkix.primitive.EncryptedPrivateKeyInfo; +import org.mozilla.jss.pkix.primitive.PrivateKeyInfo; +import org.mozilla.jss.util.Password; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java index 259fbf914..f914fab74 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/PasswordCache.java @@ -18,18 +18,29 @@ package com.netscape.cmstools; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; -import org.mozilla.jss.util.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.*; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.SecretDecoderRing.KeyManager; -import org.mozilla.jss.SecretDecoderRing.Encryptor; +import java.io.BufferedReader; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FilterOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.io.UnsupportedEncodingException; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.StringTokenizer; + +import org.mozilla.jss.CryptoManager; import org.mozilla.jss.SecretDecoderRing.Decryptor; +import org.mozilla.jss.SecretDecoderRing.Encryptor; +import org.mozilla.jss.SecretDecoderRing.KeyManager; +import org.mozilla.jss.crypto.CryptoToken; +import org.mozilla.jss.crypto.TokenException; import org.mozilla.jss.util.Base64OutputStream; +import org.mozilla.jss.util.Password; /** * Tool for interacting with the PWcache diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java index 11acde7c7..84cc54cbe 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java @@ -18,12 +18,23 @@ package com.netscape.cmstools; -import java.io.*; -import java.util.*; -import java.security.*; -import java.security.cert.*; -import netscape.security.x509.*; -import netscape.security.util.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.security.cert.CertificateException; +import java.util.Enumeration; +import java.util.Locale; + +import netscape.security.util.CertPrettyPrint; +import netscape.security.x509.CertificateSubjectName; +import netscape.security.x509.RDN; +import netscape.security.x509.X500Name; +import netscape.security.x509.X509CertImpl; +import netscape.security.x509.X509CertInfo; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java index 4d410f16f..b68f9fbc6 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCrl.java @@ -18,12 +18,25 @@ package com.netscape.cmstools; -import java.io.*; -import java.util.*; -import java.security.*; -import java.security.cert.*; -import netscape.security.x509.*; -import netscape.security.util.*; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.security.cert.CRLException; +import java.security.cert.CertificateException; +import java.util.Locale; + +import netscape.security.util.CrlPrettyPrint; +import netscape.security.x509.DeltaCRLIndicatorExtension; +import netscape.security.x509.HoldInstructionExtension; +import netscape.security.x509.InvalidityDateExtension; +import netscape.security.x509.IssuingDistributionPointExtension; +import netscape.security.x509.OIDMap; +import netscape.security.x509.X509CRLImpl; +import netscape.security.x509.X509ExtensionException; /** diff --git a/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java b/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java index b4fdf5d04..d43b35337 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/TestCRLSigning.java @@ -17,38 +17,20 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmstools; -import java.io.*; -import java.net.*; -import java.math.*; -import java.util.*; -import java.security.*; +import java.math.BigInteger; +import java.security.KeyPair; +import java.util.Date; +import java.util.Hashtable; -import org.mozilla.jss.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.util.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.pkix.crmf.*; -import org.mozilla.jss.pkcs7.ContentInfo; -import org.mozilla.jss.pkcs7.*; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.crypto.KeyPairGenerator; -import org.mozilla.jss.crypto.PrivateKey; -import org.mozilla.jss.crypto.Signature; -import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.Base64OutputStream; -import org.mozilla.jss.util.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.CryptoManager; -import org.mozilla.jss.crypto.*; -import org.mozilla.jss.CertDatabaseException; -import org.mozilla.jss.pkcs11.*; -import org.mozilla.jss.pkcs11.PK11Token; - -import netscape.security.x509.*; +import netscape.security.x509.RevokedCertImpl; +import netscape.security.x509.X500Name; +import netscape.security.x509.X509CRLImpl; -import com.netscape.cmsutil.ocsp.*; -import com.netscape.cmsutil.ocsp.Request; +import org.mozilla.jss.CryptoManager; +import org.mozilla.jss.crypto.CryptoToken; +import org.mozilla.jss.crypto.KeyPairAlgorithm; +import org.mozilla.jss.crypto.KeyPairGenerator; +import org.mozilla.jss.util.Password; /** * Tool used to test out signing a CRL diff --git a/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java b/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java index 016839ae9..ade2b4679 100644 --- a/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java +++ b/pki/base/java-tools/src/com/netscape/cmstools/TokenInfo.java @@ -18,35 +18,11 @@ package com.netscape.cmstools; -import org.mozilla.jss.pkix.cmc.*; -import org.mozilla.jss.pkix.cms.*; -import org.mozilla.jss.pkix.cert.*; -import org.mozilla.jss.pkix.primitive.*; -import org.mozilla.jss.asn1.*; -import org.mozilla.jss.pkcs10.*; -import org.mozilla.jss.crypto.*; +import java.util.Enumeration; + import org.mozilla.jss.CryptoManager; import org.mozilla.jss.crypto.CryptoToken; -import org.mozilla.jss.crypto.SignatureAlgorithm; -import org.mozilla.jss.crypto.DigestAlgorithm; -import org.mozilla.jss.crypto.X509Certificate; -import org.mozilla.jss.util.*; -import org.mozilla.jss.pkcs11.*; - -import org.mozilla.jss.*; - -import netscape.security.util.*; -import netscape.security.x509.*; -import netscape.security.pkcs.PKCS10; - -import java.security.*; -import java.security.cert.CertificateException; -import java.math.*; -import java.security.Principal; -import java.lang.*; -import java.lang.reflect.*; -import java.io.*; -import java.util.*; +import org.mozilla.jss.pkcs11.PK11Module; |