Skip to content

Commit

Permalink
Reduced error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenplieger committed Mar 7, 2019
1 parent a9f2e59 commit e9d22fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/nl/knmi/adaguc/security/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public User(String _id) throws IOException, ElementNotFoundException {
X509Certificate cert = PemX509Tools.readCertificateFromPEMFile( this.homeDir + "/cert.crt");
PrivateKey key = PemX509Tools.readPrivateKeyFromPEM(this.homeDir + "/cert.key");
this.userCert = (new PemX509Tools()).new X509UserCertAndKey(cert, key);
} catch (CertificateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Debug.println("### Loaded certificates from disk ### for " + this.userId);
} catch (Exception e) {
Debug.errprintln("### No certificates loaded found on disk for " + this.userId + " ###");
}
}

Expand Down Expand Up @@ -85,7 +85,7 @@ private synchronized void createNCResourceFile()
}
public void setCertificate(X509UserCertAndKey userCert) throws IOException, ElementNotFoundException {
/* TODO could optinally write cert to user basket */

Debug.println("### setCertificate ### for " + this.userId);

PemX509Tools.writeCertificateToPemFile(userCert.getUserSlCertificate(), this.homeDir + "/cert.crt");
PemX509Tools.writePrivateKeyToPemFile(userCert.getPrivateKey(), this.homeDir + "/cert.key");
Expand Down

0 comments on commit e9d22fd

Please sign in to comment.