summaryrefslogtreecommitdiffstats
path: root/base/util
diff options
context:
space:
mode:
authorAbhishek Koneru <akoneru@redhat.com>2012-07-19 12:46:10 -0400
committerEndi Sukma Dewata <edewata@redhat.com>2012-07-25 10:41:57 -0500
commitca401c4f9e30ab59cb12fc4098aec21b660f686f (patch)
tree9a4a349bcfaa195960801264ca36e639b896cb89 /base/util
parent2a3125d54365bf1806633c3301ce59fdb21461e4 (diff)
downloadpki-ca401c4f9e30ab59cb12fc4098aec21b660f686f.tar.gz
pki-ca401c4f9e30ab59cb12fc4098aec21b660f686f.tar.xz
pki-ca401c4f9e30ab59cb12fc4098aec21b660f686f.zip
Patch 25 - Misc Fixes
Diffstat (limited to 'base/util')
-rw-r--r--base/util/src/netscape/security/pkcs/PKCS8Key.java9
-rw-r--r--base/util/src/netscape/security/x509/CRLDistributionPoint.java11
2 files changed, 4 insertions, 16 deletions
diff --git a/base/util/src/netscape/security/pkcs/PKCS8Key.java b/base/util/src/netscape/security/pkcs/PKCS8Key.java
index db1d6b275..8806cd3fb 100644
--- a/base/util/src/netscape/security/pkcs/PKCS8Key.java
+++ b/base/util/src/netscape/security/pkcs/PKCS8Key.java
@@ -331,9 +331,7 @@ public class PKCS8Key implements PrivateKey {
* Serialization write ... PKCS#8 keys serialize as
* themselves, and they're parsed when they get read back.
*/
- private synchronized void
- writeObject(java.io.ObjectOutputStream stream)
- throws IOException {
+ private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
stream.write(getEncoded());
}
@@ -341,12 +339,9 @@ public class PKCS8Key implements PrivateKey {
* Serialization read ... PKCS#8 keys serialize as
* themselves, and they're parsed when they get read back.
*/
- private synchronized void readObject(ObjectInputStream stream)
- throws IOException {
-
+ private void readObject(ObjectInputStream stream) throws IOException {
try {
decode(stream);
-
} catch (InvalidKeyException e) {
e.printStackTrace();
throw new IOException("deserialized key is invalid: " +
diff --git a/base/util/src/netscape/security/x509/CRLDistributionPoint.java b/base/util/src/netscape/security/x509/CRLDistributionPoint.java
index 637ee57fe..7c591aee5 100644
--- a/base/util/src/netscape/security/x509/CRLDistributionPoint.java
+++ b/base/util/src/netscape/security/x509/CRLDistributionPoint.java
@@ -251,7 +251,7 @@ public class CRLDistributionPoint implements ASN1Value {
return templateInstance;
}
- public static void main(String args[]) throws Exception {
+ public static void main(String args[]) throws GeneralNamesException, IOException, InvalidBERException {
ByteArrayOutputStream bos = null;
FileOutputStream fos = null;
try {
@@ -337,9 +337,6 @@ public class CRLDistributionPoint implements ASN1Value {
}
System.out.println("Done");
- } catch (Exception e) {
- e.printStackTrace();
- throw e;
} finally {
if (bos != null) {
bos.close();
@@ -348,11 +345,7 @@ public class CRLDistributionPoint implements ASN1Value {
fos.close();
}
if (fos != null) {
- try {
- fos.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
+ fos.close();
}
}
}