summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
authorawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-07 23:59:03 +0000
committerawnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2011-10-07 23:59:03 +0000
commitb9080254e55c7bc7b06a38ad1ebd2570ff50c697 (patch)
tree314805eee85721de14c8917aafe5860fe887452f /pki
parent266e61562a2b7f2be88c000def6d8ad579159954 (diff)
downloadpki-b9080254e55c7bc7b06a38ad1ebd2570ff50c697.tar.gz
pki-b9080254e55c7bc7b06a38ad1ebd2570ff50c697.tar.xz
pki-b9080254e55c7bc7b06a38ad1ebd2570ff50c697.zip
Fixed bugzilla bug #743770.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@2258 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki')
-rw-r--r--pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java9
-rw-r--r--pki/base/silent/src/common/AutoInstaller.java1
2 files changed, 9 insertions, 1 deletions
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 b5ed8177f..11acde7c7 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/PrettyPrintCert.java
@@ -213,7 +213,7 @@ public class PrettyPrintCert {
} else {
try {
outputCert = new FileOutputStream(outputfile);
- } catch (IOException e) {
+ } catch (Exception e) {
System.out.println("PrettyPrintCert: unable to open file " +
argv[1] + " for writing:\n" + e);
return;
@@ -221,6 +221,13 @@ public class PrettyPrintCert {
try {
outputCert.write(pp.getBytes());
+ } catch (IOException e) {
+ System.out.println("PrettyPrintCert: Unexpected error " +
+ "encountered while attempting to write() " +
+ outputfile + ":\n" + e);
+ }
+
+ try {
outputCert.close();
} catch (IOException e) {
System.out.println("PrettyPrintCert: Unexpected error " +
diff --git a/pki/base/silent/src/common/AutoInstaller.java b/pki/base/silent/src/common/AutoInstaller.java
index 3fb1c4a8b..bd4897d76 100644
--- a/pki/base/silent/src/common/AutoInstaller.java
+++ b/pki/base/silent/src/common/AutoInstaller.java
@@ -121,6 +121,7 @@ public class AutoInstaller {
byte b[] = new byte[size];
if (f1.read(b) != b.length) {
+ f1.close();
return false;
}
f2 = new FileOutputStream(