You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
The timeout of a transceive command is enforced to the default on connect(), irrelevant of the existing timeout (which can be queried with getTimeout()):
The default timeout is a pretty arbitrary number. As the documentation (https://developer.android.com/reference/android/nfc/tech/IsoDep#setTimeout(int)) tells, increasing the timeout might be necessary to facilitate longer commands, such as key generation (which, for RSA, can take well over current default of 15 seconds, or even 1 minute, per key)
Changing the (default) timeout should only happen to facilitate a feature or remove a bug. If nordpol is used in a proxy-style application, passing remotely generated APDU-s to a card, the context of the APDU-s is not known (e.g. APDU-s triggering key generation can be encrypted) to facilitate manual changing of the timeout for such single commands. Thus the default timeout set should be "infinity" to support any kind of APDU-s, irrelevant of context.
Thus, some or all of the following should be done:
make the default value programmatically configurable (setter)
change the default value to "infinity" (or a measurable value of similar practical effect) in nordpol
remove setting the default timeout during connect() and let the calling application set a default based on application context
document the fact so that nordpol users could set the right default value or a single timeout for a long command.
The text was updated successfully, but these errors were encountered:
remove setting the default timeout during connect() and let the calling application set a default based on application context
I was doing tests removing the setTimeOut after connect and it didn't work properly. Seems to be that the defined value should be set always afterconnect() in order to makes it work.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The timeout of a transceive command is enforced to the default on
connect()
, irrelevant of the existing timeout (which can be queried with getTimeout()):https://github.com/fidesmo/nordpol/blob/master/android/src/main/java/nordpol/AndroidCard.java#L63
The default timeout is a pretty arbitrary number. As the documentation (https://developer.android.com/reference/android/nfc/tech/IsoDep#setTimeout(int)) tells, increasing the timeout might be necessary to facilitate longer commands, such as key generation (which, for RSA, can take well over current default of 15 seconds, or even 1 minute, per key)
Changing the (default) timeout should only happen to facilitate a feature or remove a bug. If nordpol is used in a proxy-style application, passing remotely generated APDU-s to a card, the context of the APDU-s is not known (e.g. APDU-s triggering key generation can be encrypted) to facilitate manual changing of the timeout for such single commands. Thus the default timeout set should be "infinity" to support any kind of APDU-s, irrelevant of context.
Thus, some or all of the following should be done:
The text was updated successfully, but these errors were encountered: