summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eaaf_core/pom.xml5
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java12
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/builder/BpkBuilder.java8
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/EaafKeyStoreFactory.java2
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java4
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonDeserializer.java2
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonSerializer.java2
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/JoseUtils.java4
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java9
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/pom.xml5
-rw-r--r--eaaf_modules/eaaf_module_moa-sig/pom.xml5
-rw-r--r--eaaf_modules/eaaf_module_pvp2_core/pom.xml5
-rw-r--r--eaaf_modules/eaaf_module_pvp2_idp/pom.xml7
-rw-r--r--eaaf_modules/eaaf_module_pvp2_sp/pom.xml7
-rw-r--r--pom.xml9
15 files changed, 56 insertions, 30 deletions
diff --git a/eaaf_core/pom.xml b/eaaf_core/pom.xml
index ad0ab63c..e93e4d38 100644
--- a/eaaf_core/pom.xml
+++ b/eaaf_core/pom.xml
@@ -41,6 +41,11 @@
<artifactId>spring-webmvc</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
index 92bf8af3..3b3e7cd8 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java
@@ -29,11 +29,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
-import javax.annotation.Nonnull;
-
import org.apache.commons.lang3.StringUtils;
-import org.springframework.lang.NonNull;
-import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -56,6 +52,8 @@ import at.gv.egiz.eaaf.core.impl.json.EscapedJsonDeserializer;
import at.gv.egiz.eaaf.core.impl.json.EscapedJsonSerializer;
import at.gv.egiz.eaaf.core.impl.utils.DefaultJsonMapper;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
+import jakarta.annotation.Nonnull;
+import jakarta.annotation.Nullable;
import jakarta.servlet.http.HttpServletRequest;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -156,8 +154,8 @@ public abstract class RequestImpl implements IRequest, Serializable {
* @throws EaafException
*
*/
- public final void initialize(@NonNull final HttpServletRequest req,
- @NonNull final IConfigurationWithSP authConfig, @Nullable final String transactionId,
+ public final void initialize(@Nonnull final HttpServletRequest req,
+ @Nonnull final IConfigurationWithSP authConfig, @Nullable final String transactionId,
@Nullable final String piiTransactionId)
throws EaafException {
// use external transactionId or create new one if empty or null
@@ -275,7 +273,7 @@ public abstract class RequestImpl implements IRequest, Serializable {
}
@Override
- @NonNull
+ @Nonnull
public final String getPendingRequestId() {
if (pendingRequestId == null) {
throw new IllegalStateException("No PendingRequestId set!!!");
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/builder/BpkBuilder.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/builder/BpkBuilder.java
index 903aa300..cf26694c 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/builder/BpkBuilder.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/builder/BpkBuilder.java
@@ -24,6 +24,7 @@ import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.text.SimpleDateFormat;
+import java.util.Base64;
import java.util.Date;
import java.util.Map.Entry;
@@ -36,7 +37,6 @@ import javax.crypto.NoSuchPaddingException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
-import org.springframework.util.Base64Utils;
import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException;
@@ -190,7 +190,7 @@ public class BpkBuilder {
try {
final byte[] inputBytes = input.getBytes("ISO-8859-1");
result = encrypt(inputBytes, publicKey);
- return new String(Base64Utils.encode(result), "ISO-8859-1").replaceAll("\r\n", "");
+ return new String(Base64.getEncoder().encode(result), "ISO-8859-1").replaceAll("\r\n", "");
// return new String(Base64Utils.encode(result,
// "ISO-8859-1")).replaceAll("\r\n", "");
@@ -221,7 +221,7 @@ public class BpkBuilder {
}
try {
- final byte[] encryptedBytes = Base64Utils.decode(encryptedBpk.getBytes("ISO-8859-1"));
+ final byte[] encryptedBytes = Base64.getDecoder().decode(encryptedBpk.getBytes("ISO-8859-1"));
final byte[] decryptedBytes = decrypt(encryptedBytes, privateKey);
decryptedString = new String(decryptedBytes, "ISO-8859-1");
@@ -398,7 +398,7 @@ public class BpkBuilder {
final MessageDigest md = MessageDigest.getInstance("SHA-1");
final byte[] hash = md.digest(basisbegriff.getBytes("ISO-8859-1"));
final String hashBase64 =
- new String(Base64Utils.encode(hash), "ISO-8859-1").replaceAll("\r\n", ""); // Base64Utils.encode(hash);
+ new String(Base64.getEncoder().encode(hash), "ISO-8859-1").replaceAll("\r\n", "");
return hashBase64;
} catch (final Exception ex) {
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/EaafKeyStoreFactory.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/EaafKeyStoreFactory.java
index 673a373d..ec275ec5 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/EaafKeyStoreFactory.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/credential/EaafKeyStoreFactory.java
@@ -206,7 +206,7 @@ public class EaafKeyStoreFactory {
} catch (final Exception e) {
log.info("Can not determine state of alreay loaded HSM Facade: {} because HealthCheck not support",
- alreadyLoadedProvider.getVersion());
+ alreadyLoadedProvider.getVersionStr());
log.debug("Full HSM-Facade health-check exception", e);
return HsmFacadeStatus.UNKNOWN;
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java
index e7f952e4..b604edce 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/data/ExceptionContainer.java
@@ -63,7 +63,7 @@ public class ExceptionContainer implements Serializable {
/**
* Error that was thrown.
*/
- private byte[] internalExceptionThrown = null;
+ private byte[] internalExceptionThrown;
/**
* pendingReq that throws this error.
@@ -71,7 +71,7 @@ public class ExceptionContainer implements Serializable {
@JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS, property = "@class")
@JsonSerialize(using = EscapedJsonSerializer.class)
@JsonDeserialize(using = EscapedJsonDeserializer.class)
- private IRequest pendingReq = null;
+ private IRequest pendingReq;
/**
* Create an exception container.
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonDeserializer.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonDeserializer.java
index 5a081ec5..0bc5b825 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonDeserializer.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonDeserializer.java
@@ -72,7 +72,7 @@ public class EscapedJsonDeserializer extends JsonDeserializer<Object> implements
String str = p.readValueAs(String.class);
TreeNode root = ((ObjectMapper) p.getCodec()).readTree(str);
try {
- Class clz = Class.forName(((TextNode) root.get("@class")).asText());
+ Class<?> clz = Class.forName(((TextNode) root.get("@class")).asText());
if (this.javaType.getRawClass().isAssignableFrom(clz)) {
// remove '@class' before deserialization because it's unknown in target class
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonSerializer.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonSerializer.java
index a79f4d90..3196b7a4 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonSerializer.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/json/EscapedJsonSerializer.java
@@ -39,7 +39,7 @@ public class EscapedJsonSerializer extends StdSerializer<Object> {
if (value instanceof Collection || value.getClass().isArray()) {
tempGen.writeStartArray();
if (value instanceof Collection) {
- for (Object it : (Collection) value) {
+ for (Object it : (Collection<?>) value) {
writeTree(gen, it, tempGen);
}
} else if (value.getClass().isArray()) {
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/JoseUtils.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/JoseUtils.java
index f3c8588d..abbee1d9 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/JoseUtils.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/JoseUtils.java
@@ -16,6 +16,7 @@ import java.security.interfaces.RSAPrivateKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
+import java.util.Base64;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@@ -34,7 +35,6 @@ import org.jose4j.jwx.Headers;
import org.jose4j.jwx.JsonWebStructure;
import org.jose4j.keys.resolvers.X509VerificationKeyResolver;
import org.jose4j.lang.JoseException;
-import org.springframework.util.Base64Utils;
import at.gv.egiz.eaaf.core.exception.EaafKeyUsageException;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
@@ -381,7 +381,7 @@ public class JoseUtils {
log.info("Can NOT find JOSE certificate in truststore.");
if (log.isDebugEnabled()) {
try {
- log.debug("Cert: {}", Base64Utils.encodeToString(sortedX5cCerts.get(0).getEncoded()));
+ log.debug("Cert: {}", Base64.getEncoder().encodeToString(sortedX5cCerts.get(0).getEncoded()));
} catch (final CertificateEncodingException e) {
log.warn("Can not create DEBUG output", e);
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
index b0a91e74..153876f8 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtils.java
@@ -55,17 +55,10 @@ public class KeyValueUtils {
* @param properties Java {@link Properties} that should be converted
* @return
*/
+ @SuppressWarnings("unchecked")
public static Map<String, String> convertPropertiesToMap(final Properties properties) {
return new HashMap<String, String>((Map) properties);
- // INFO Java8 solution ;)
- // return properties.entrySet().stream().collect(
- // Collectors.toMap(
- // e -> e.getKey().toString(),
- // e -> e.getValue().toString()
- // )
- // );
-
}
/**
diff --git a/eaaf_modules/eaaf_module_auth_sl20/pom.xml b/eaaf_modules/eaaf_module_auth_sl20/pom.xml
index 8ec445bc..22b3d0e8 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/pom.xml
+++ b/eaaf_modules/eaaf_module_auth_sl20/pom.xml
@@ -47,6 +47,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
diff --git a/eaaf_modules/eaaf_module_moa-sig/pom.xml b/eaaf_modules/eaaf_module_moa-sig/pom.xml
index 3844df74..2d8d16cf 100644
--- a/eaaf_modules/eaaf_module_moa-sig/pom.xml
+++ b/eaaf_modules/eaaf_module_moa-sig/pom.xml
@@ -74,6 +74,11 @@
<artifactId>spring-webmvc</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>joda-time</groupId>
diff --git a/eaaf_modules/eaaf_module_pvp2_core/pom.xml b/eaaf_modules/eaaf_module_pvp2_core/pom.xml
index 9da56bba..1176e1b8 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/pom.xml
+++ b/eaaf_modules/eaaf_module_pvp2_core/pom.xml
@@ -83,6 +83,11 @@
<artifactId>spring-webmvc</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/pom.xml b/eaaf_modules/eaaf_module_pvp2_idp/pom.xml
index bfd3b278..48c1e8e0 100644
--- a/eaaf_modules/eaaf_module_pvp2_idp/pom.xml
+++ b/eaaf_modules/eaaf_module_pvp2_idp/pom.xml
@@ -22,7 +22,12 @@
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
diff --git a/eaaf_modules/eaaf_module_pvp2_sp/pom.xml b/eaaf_modules/eaaf_module_pvp2_sp/pom.xml
index 90e4866f..3ea61b1c 100644
--- a/eaaf_modules/eaaf_module_pvp2_sp/pom.xml
+++ b/eaaf_modules/eaaf_module_pvp2_sp/pom.xml
@@ -28,7 +28,12 @@
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
diff --git a/pom.xml b/pom.xml
index 18e7fbb9..e7100462 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,8 +20,8 @@
<egiz.eaaf.version>${project.version}</egiz.eaaf.version>
<!-- ===================================================================== -->
- <at.gv.egiz.components.eventlog-api.version>0.4</at.gv.egiz.components.eventlog-api.version>
- <at.gv.egiz.components.egiz-spring-api>0.3.1</at.gv.egiz.components.egiz-spring-api>
+ <at.gv.egiz.components.eventlog-api.version>1.0.0</at.gv.egiz.components.eventlog-api.version>
+ <at.gv.egiz.components.egiz-spring-api>1.0.0</at.gv.egiz.components.egiz-spring-api>
<MOA.spss.server.moa-sig-lib.version>3.2.2</MOA.spss.server.moa-sig-lib.version>
<MOA.spss.tsl_lib.version>2.1.1</MOA.spss.tsl_lib.version>
@@ -500,6 +500,11 @@
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${org.springframework.version}</version>
+ </dependency>
<!-- Embbeded Tomcat dependencies -->
<dependency>