aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-03-01 10:30:31 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-03-01 10:30:31 +0100
commit4487db6d1df29f52362c905e6ab3976320abf249 (patch)
tree01003234057b353acb1700486392563edafba688 /id
parente9d885d2dbcfa2234bfa3b1db701c3956278624d (diff)
downloadmoa-id-spss-4487db6d1df29f52362c905e6ab3976320abf249.tar.gz
moa-id-spss-4487db6d1df29f52362c905e6ab3976320abf249.tar.bz2
moa-id-spss-4487db6d1df29f52362c905e6ab3976320abf249.zip
fix some problems in SSO-transfer-modul
Diffstat (limited to 'id')
-rw-r--r--id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java7
-rw-r--r--id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java8
-rw-r--r--id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java21
3 files changed, 16 insertions, 20 deletions
diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java
index 80c2663fb..56bbeed5c 100644
--- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java
+++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java
@@ -443,10 +443,11 @@ public class SSOTransferServlet{
container.getDhParams().getF().getG());
byte[] sharedSecret = getSecret(mobilePubKeySpec, container.getDhParams().getS());
- Logger.debug("Finished Diffie-Hellman key exchange. --> Starting CSR decryption ...");
- //TODO decrypt CSR
- byte[] decryptedCSR = Base64Utils.decode(mobileCSRBase64, true);
+ Logger.debug("Finished Diffie-Hellman key exchange. --> Starting CSR decryption ...");
+ byte[] encryptedCSR = Base64Utils.decode(mobileCSRBase64, true);
+ //TODO decrypt CSR
+ byte[] decryptedCSR = encryptedCSR;
//generate certificate from CSR
X509Certificate mobileCert = signCSRWithMOAKey(decryptedCSR);
diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java
index 4d41ff652..cc6b34cf5 100644
--- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java
+++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java
@@ -118,6 +118,10 @@ import iaik.x509.X509Certificate;
*/
@Service("SSOContainerUtils")
public class SSOContainerUtils {
+
+ private static final String PVP_HOLDEROFKEY_NAME = PVPConstants.URN_OID_PREFIX +
+ "1.2.40.0.10.2.1.1.261.xx.xx";
+
public static final List<String> REQUIRED_ATTRIBUTES;
static {
List<String> tmp = new ArrayList<String>();
@@ -133,7 +137,9 @@ public class SSOContainerUtils {
tmp.add(PVPConstants.MANDATE_PROF_REP_OID_NAME);
tmp.add(PVPConstants.MANDATE_PROF_REP_DESC_NAME);
tmp.add(PVPConstants.EID_CITIZEN_QAA_LEVEL_NAME);
- tmp.add(PVPConstants.PVP_HOLDEROFKEY_NAME);
+
+ //TODO: change to final definition
+ tmp.add(PVP_HOLDEROFKEY_NAME);
REQUIRED_ATTRIBUTES = Collections.unmodifiableList(tmp);
}
diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java b/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java
index 1beab574a..f40770c7f 100644
--- a/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java
+++ b/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java
@@ -22,17 +22,6 @@
*/
package at.gv.egiz.tests;
-import java.io.IOException;
-
-import org.hibernate.mapping.Map;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-
/**
* @author tlenz
*
@@ -64,11 +53,11 @@ public class Tests {
-
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+//
+// } catch (IOException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }