diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-26 00:48:11 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-27 16:36:22 -0500 |
commit | 2ad71e6dab29ca5ed8362fe7cb672325884aaec5 (patch) | |
tree | bb19d73925dd0a5b56ec41ff10c4d251a943fd83 /base/util | |
parent | 78378144e71a00a67690a1f99152402c892b0103 (diff) | |
download | pki-2ad71e6dab29ca5ed8362fe7cb672325884aaec5.tar.gz pki-2ad71e6dab29ca5ed8362fe7cb672325884aaec5.tar.xz pki-2ad71e6dab29ca5ed8362fe7cb672325884aaec5.zip |
Replaced deprecated XMLSerializer.
The deprecated XMLSerializer has been replaced with LSSerializer.
The new API does not provide a way to control the indentation or
line width.
Ticket #3
Diffstat (limited to 'base/util')
-rw-r--r-- | base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java index bf8a9cfc1..06f177887 100644 --- a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java +++ b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java @@ -406,7 +406,7 @@ public class CryptoUtil { /** * strips out the begin and end certificate brackets - * + * * @param s the string potentially bracketed with * "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" * @return string without the brackets @@ -744,8 +744,7 @@ public class CryptoUtil { certInfo.set(X509CertInfo.ALGORITHM_ID, new CertificateAlgorithmId(aid)); - org.mozilla.jss.crypto.PrivateKey priKey = - (org.mozilla.jss.crypto.PrivateKey) privateKey; + org.mozilla.jss.crypto.PrivateKey priKey = privateKey; CryptoToken token = priKey.getOwningToken(); DerOutputStream tmp = new DerOutputStream(); @@ -991,7 +990,7 @@ public class CryptoUtil { Enumeration<CryptoToken> enums = cm.getAllTokens(); while (enums.hasMoreElements()) { - CryptoToken token = (CryptoToken) enums.nextElement(); + CryptoToken token = enums.nextElement(); CryptoStore store = token.getCryptoStore(); org.mozilla.jss.crypto.X509Certificate list[] = store.getCertificates(); @@ -1141,7 +1140,7 @@ public class CryptoUtil { return certs; } - + @SuppressWarnings("deprecation") public static String unwrapUsingPassphrase(String wrappedRecoveredKey, String recoveryPassphrase) throws IOException, InvalidBERException, InvalidKeyException, IllegalStateException, @@ -1205,7 +1204,6 @@ public class CryptoUtil { return wrappedPassphrase; } - @SuppressWarnings("deprecation") public static byte[] wrapSymmetricKey(CryptoManager manager, CryptoToken token, String transportCert, SymmetricKey sk) throws CertificateEncodingException, TokenException, NoSuchAlgorithmException, InvalidKeyException, InvalidAlgorithmParameterException { @@ -1258,7 +1256,7 @@ public class CryptoUtil { encoded = oStream.toByteArray(); ByteArrayInputStream inStream = new ByteArrayInputStream(encoded); - + @SuppressWarnings("unused") PKIArchiveOptions options = (PKIArchiveOptions) (new PKIArchiveOptions.Template()).decode(inStream); @@ -1268,7 +1266,7 @@ public class CryptoUtil { } // START ENABLE_ECC -// This following can be removed when JSS with ECC capability +// This following can be removed when JSS with ECC capability // is integrated. class CryptoAlgorithm extends Algorithm { protected CryptoAlgorithm(int oidIndex, String name) { |