summaryrefslogtreecommitdiffstats
path: root/auth/auth-certman/src
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-certman/src')
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java6
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java2
-rw-r--r--auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java2
3 files changed, 6 insertions, 4 deletions
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java
index 521c5016..00b0b378 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/CA.java
@@ -115,8 +115,10 @@ public abstract class CA {
bytes = new byte[(int)crt.length()];
FileInputStream fis = new FileInputStream(crt);
try {
- fis.read(bytes);
- addTrustedCA(new String(bytes));
+ int read = fis.read(bytes);
+ if(read>0) {
+ addTrustedCA(new String(bytes));
+ }
} finally {
fis.close();
}
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java
index ae4e21aa..0d494acd 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/ca/JscepCA.java
@@ -61,7 +61,7 @@ public class JscepCA extends CA {
private final static String MS_PROFILE="1";
private final static int MAX_RETRY=3;
- public static final long INVALIDATE_TIME = 1000*60*10; // 10 mins
+ public static final long INVALIDATE_TIME = 1000*60*10L; // 10 mins
// package on purpose
private Map<String,X509ChainWithIssuer> mxcwi_s;
diff --git a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
index f6407d90..4ef5472a 100644
--- a/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
+++ b/auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java
@@ -643,7 +643,7 @@ public class CMService {
|| trans.user().equals(sponsor)) {
return artiDAO.delete(trans, add, false);
}
- return null;
+ return Result.err(Result.ERR_Denied, "%1 is not allowed to delete this item",trans.user());
}
public Result<Void> deleteArtifact(AuthzTrans trans, List<ArtiDAO.Data> list) {