Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ecsec Public
reqesidta-prototype
client-signer
Commits
4ff34aa3
Commit
4ff34aa3
authored
Sep 25, 2019
by
Tobias Wich
Browse files
Merge branch 'master' into java11
parents
9ecb2be1
6e8048f3
Changes
52
Hide whitespace changes
Inline
Side-by-side
addon/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
addons/chipgateway/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
addons
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.addons
</groupId>
...
...
addons/genericcryptography/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
addons
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.addons
</groupId>
...
...
addons/pin-management/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
addons
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.addons
</groupId>
...
...
addons/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
addons/status/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
addons
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.addons
</groupId>
...
...
addons/tr03112/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
addons
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.addons
</groupId>
...
...
addons/tr03112/src/main/java/org/openecard/sal/protocol/eac/PACEStep.java
View file @
4ff34aa3
...
...
@@ -302,8 +302,8 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
needsTermination
=
true
;
}
}
// terminate activation thread
if
(
needsTermination
)
{
// terminate activation thread
if it has not been interrupted already
if
(
needsTermination
&&
guiResult
!=
ResultStatus
.
INTERRUPTED
)
{
Thread
actThread
=
(
Thread
)
dynCtx2
.
get
(
TR03112Keys
.
ACTIVATION_THREAD
);
if
(
actThread
!=
null
)
{
LOG
.
debug
(
"Interrupting activation thread."
);
...
...
@@ -399,6 +399,14 @@ public class PACEStep implements ProtocolStep<DIDAuthenticate, DIDAuthenticateRe
LOG
.
error
(
ex
.
getMessage
(),
ex
);
response
.
setResult
(
WSHelper
.
makeResultError
(
ECardConstants
.
Minor
.
App
.
INCORRECT_PARM
,
ex
.
getMessage
()));
dynCtx
.
put
(
EACProtocol
.
AUTHENTICATION_DONE
,
false
);
}
catch
(
InterruptedException
e
)
{
LOG
.
error
(
e
.
getMessage
(),
e
);
response
.
setResult
(
WSHelper
.
makeResultUnknownError
(
e
.
getMessage
()));
dynCtx
.
put
(
EACProtocol
.
AUTHENTICATION_DONE
,
false
);
Thread
guiThread
=
(
Thread
)
dynCtx
.
get
(
TR03112Keys
.
OPEN_USER_CONSENT_THREAD
);
if
(
guiThread
!=
null
)
{
guiThread
.
interrupt
();
}
}
catch
(
Exception
e
)
{
LOG
.
error
(
e
.
getMessage
(),
e
);
response
.
setResult
(
WSHelper
.
makeResultUnknownError
(
e
.
getMessage
()));
...
...
bindings/http/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
bindings
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.bindings
</groupId>
...
...
bindings/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
cifs/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
clients/android-core/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
clients
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.clients
</groupId>
...
...
clients/android-lib/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
clients
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.clients
</groupId>
...
...
clients/android-lib/src/main/java/org/openecard/android/activation/AbstractActivationHandler.java
View file @
4ff34aa3
...
...
@@ -42,7 +42,9 @@ import org.openecard.android.system.ServiceResponse;
import
org.openecard.android.utils.NfcUtils
;
import
org.openecard.common.event.EventObject
;
import
org.openecard.common.event.EventType
;
import
org.openecard.common.event.IfdEventObject
;
import
org.openecard.common.interfaces.EventCallback
;
import
org.openecard.common.sal.state.CardStateEntry
;
import
org.openecard.common.util.CombinedPromise
;
import
org.openecard.common.util.Promise
;
import
org.openecard.gui.android.AndroidGui
;
...
...
@@ -144,6 +146,14 @@ public abstract class AbstractActivationHandler <T extends Activity, GUI extends
// add callback to this abstract activity when card is removed
cardRecognized
=
false
;
// check card states for already inserted card and call recognised handler
CardStateEntry
availableCard
=
getAvailableCard
();
if
(
availableCard
!=
null
)
{
insertionHandler
.
signalEvent
(
EventType
.
CARD_INSERTED
,
new
IfdEventObject
(
availableCard
.
handleCopy
()));
cardDetectHandler
.
signalEvent
(
EventType
.
RECOGNIZED_CARD_ACTIVE
,
new
IfdEventObject
(
availableCard
.
handleCopy
()));
}
octx
.
getEventDispatcher
().
add
(
insertionHandler
,
EventType
.
CARD_REMOVED
,
EventType
.
CARD_INSERTED
);
octx
.
getEventDispatcher
().
add
(
cardDetectHandler
,
EventType
.
RECOGNIZED_CARD_ACTIVE
);
octx
.
getEventDispatcher
().
add
(
removalHandler
,
EventType
.
CARD_REMOVED
);
...
...
@@ -168,6 +178,27 @@ public abstract class AbstractActivationHandler <T extends Activity, GUI extends
}
}
private
CardStateEntry
getAvailableCard
()
{
// look in card states for a card matching our criteria
Set
<
String
>
types
=
getSupportedCards
();
if
(
types
!=
null
)
{
for
(
String
type
:
types
)
{
ConnectionHandleType
query
=
new
ConnectionHandleType
();
ConnectionHandleType
.
RecognitionInfo
rinfo
=
new
ConnectionHandleType
.
RecognitionInfo
();
rinfo
.
setCardType
(
type
);
query
.
setRecognitionInfo
(
rinfo
);
CardStateEntry
entry
=
octx
.
getCardStates
().
getEntry
(
query
);
if
(
entry
!=
null
)
{
return
entry
;
}
}
return
null
;
}
else
{
return
octx
.
getCardStates
().
getEntry
(
new
ConnectionHandleType
());
}
}
@Nullable
private
Class
<?>
forClassName
(
@Nullable
String
className
)
{
if
(
className
!=
null
)
{
...
...
@@ -200,11 +231,7 @@ public abstract class AbstractActivationHandler <T extends Activity, GUI extends
public
void
onStop
()
{
// make sure nothing is running anymore
Thread
at
=
authThread
;
if
(
at
!=
null
)
{
authThread
=
null
;
// prevent calling handler at all, we are shutting down
cancelAuthenticationInt
(
at
,
false
,
false
);
}
cancelAuthenticationInt
(
authThread
,
false
);
// remove callback which is set onStart
if
(
octx
!=
null
)
{
...
...
@@ -358,24 +385,24 @@ public abstract class AbstractActivationHandler <T extends Activity, GUI extends
@Override
public
void
cancelAuthentication
(
boolean
runInThread
)
{
cancelAuthenticationInt
(
authThread
,
true
,
runInThread
);
cancelAuthenticationInt
(
authThread
,
runInThread
);
}
private
void
cancelAuthenticationInt
(
Thread
at
,
boolean
showFailure
,
boolean
runInNewThread
)
{
private
void
cancelAuthenticationInt
(
Thread
at
,
boolean
runInNewThread
)
{
if
(
at
!=
null
)
{
if
(
at
==
authThread
)
{
authThread
=
null
;
}
// define function
Runnable
fun
=
()
->
{
try
{
LOG
.
info
(
"Stopping Authentication thread ..."
);
at
.
interrupt
();
// cancel task and handle event
if
(
showFailure
)
{
String
msg
=
""
;
ActivationResult
r
=
new
ActivationResult
(
ActivationResultCode
.
INTERRUPTED
,
msg
);
handleActivationResult
(
r
);
}
String
msg
=
""
;
ActivationResult
result
=
new
ActivationResult
(
ActivationResultCode
.
INTERRUPTED
,
msg
);
onAuthenticationInterrupted
(
result
);
LOG
.
info
(
"Stopping Authentication thread ..."
);
at
.
interrupt
();
at
.
join
();
LOG
.
info
(
"Authentication thread has stopped."
);
...
...
clients/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
clients/richclient/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
clients
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.clients
</groupId>
...
...
common/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
crypto/crypto-common/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<artifactId>
crypto
</artifactId>
<groupId>
org.openecard
</groupId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.crypto
</groupId>
...
...
crypto/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
src-parent
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
<relativePath>
../src-parent/
</relativePath>
</parent>
...
...
crypto/tls/pom.xml
View file @
4ff34aa3
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
org.openecard
</groupId>
<artifactId>
crypto
</artifactId>
<version>
1.4.0-rc.
3
-SNAPSHOT
</version>
<version>
1.4.0-rc.
4
-SNAPSHOT
</version>
</parent>
<groupId>
org.openecard.crypto
</groupId>
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment