Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 21f63c6

Browse files
docs: Add a precision in "processOpening" and "processClosing" methods
Closes #15
1 parent 89a7af7 commit 21f63c6

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Documentation of `processOpening` and `processClosing` methods (issue [#15]).
810

911
## [1.0.3] - 2021-12-15
1012
### Changed
@@ -31,6 +33,7 @@ This is the initial release.
3133
[1.0.1]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/compare/1.0.0...1.0.1
3234
[1.0.0]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/releases/tag/1.0.0
3335

36+
[#15]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/15
3437
[#13]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/13
3538
[#11]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/11
3639
[#9]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/9

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
group = org.calypsonet.terminal
22
title = Calypsonet Terminal Calypso API
33
description = API defining the needed interfaces to manage Calypso cards
4-
version = 1.0.3
4+
version = 1.0.4
55

66
javaSourceLevel = 1.6
77
javaTargetLevel = 1.6

src/main/java/org/calypsonet/terminal/calypso/transaction/CardTransactionManager.java

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public interface CardTransactionManager {
124124
*
125125
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
126126
*
127-
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
127+
* <p>Depending on whether we are inside a secure session, there are two types of behavior
128128
* following this command:
129129
*
130130
* <ul>
@@ -157,7 +157,7 @@ public interface CardTransactionManager {
157157
*
158158
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
159159
*
160-
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
160+
* <p>Depending on whether we are inside a secure session, there are two types of behavior
161161
* following this command:
162162
*
163163
* <ul>
@@ -192,7 +192,7 @@ CardTransactionManager prepareReadRecordFile(
192192
*
193193
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
194194
*
195-
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
195+
* <p>Depending on whether we are inside a secure session, there are two types of behavior
196196
* following this command:
197197
*
198198
* <ul>
@@ -218,7 +218,7 @@ CardTransactionManager prepareReadRecordFile(
218218
* Schedules the execution of a <b>Verify Pin</b> command without PIN presentation in order to get
219219
* the attempt counter.
220220
*
221-
* <p>The PIN status will made available in CalypsoCard after the execution of process command.
221+
* <p>The PIN status will be made available in CalypsoCard after the execution of process command.
222222
* <br>
223223
* Adds it to the list of commands to be sent with the next process command.
224224
*
@@ -351,8 +351,8 @@ CardTransactionManager prepareReadRecordFile(
351351
*
352352
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
353353
*
354-
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link CalypsoCard#getSvLoadLogRecord()}
355-
* ()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
354+
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link
355+
* CalypsoCard#getSvLoadLogRecord()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
356356
* CalypsoCard#getSvDebitLogAllRecords()}.
357357
*
358358
* @param svOperation Informs about the nature of the intended operation: debit or reload.
@@ -476,8 +476,8 @@ CardTransactionManager prepareReadRecordFile(
476476
* objects (see {@link CalypsoCard#getSvLoadLogRecord()} and {@link
477477
* CalypsoCard#getSvDebitLogAllRecords()}).
478478
*
479-
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link CalypsoCard#getSvLoadLogRecord()}
480-
* ()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
479+
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link
480+
* CalypsoCard#getSvLoadLogRecord()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
481481
* CalypsoCard#getSvDebitLogAllRecords()}.
482482
*
483483
* @return The current instance.
@@ -555,7 +555,7 @@ CardTransactionManager prepareReadRecordFile(
555555
CardTransactionManager processCardCommands();
556556

557557
/**
558-
* Performs a PIN verification, in order to authenticate the card holder and/or unlock access to
558+
* Performs a PIN verification, in order to authenticate the cardholder and/or unlock access to
559559
* certain card files.
560560
*
561561
* <p>This command can be performed both in and out of a secure session. The PIN code can be
@@ -609,7 +609,7 @@ CardTransactionManager prepareReadRecordFile(
609609
* <p>It is the starting point of the sequence:
610610
*
611611
* <ul>
612-
* <li>{@link #processOpening(WriteAccessLevel)}
612+
* <li>{@code processOpening(WriteAccessLevel)}
613613
* <li>[{@link #processCardCommands()}]
614614
* <li>[...]
615615
* <li>[{@link #processCardCommands()}]
@@ -626,7 +626,7 @@ CardTransactionManager prepareReadRecordFile(
626626
* object, otherwise a {@link IllegalStateException} is raised.
627627
*
628628
* <p>The secure session is opened with the {@link WriteAccessLevel} passed as an argument
629-
* depending on whether it is a personalization, reload or debit transaction profile..
629+
* depending on whether it is a personalization, reload or debit transaction profile.
630630
*
631631
* <p>The possible overflow of the internal session buffer of the card is managed in two ways
632632
* depending on the setting chosen in {@link CardSecuritySetting}.
@@ -663,6 +663,10 @@ CardTransactionManager prepareReadRecordFile(
663663
* card file then this one is replaced by a setting of the session opening command allowing the
664664
* retrieval of this data in response to this command.
665665
*
666+
* <p>Please note that the CAAD mechanism may require a file to be read before being modified. For
667+
* this mechanism to work properly, this reading must not be placed in the first position of the
668+
* prepared commands in order to be correctly taken into account by the SAM.
669+
*
666670
* <p><b>Other operations carried out</b>
667671
*
668672
* <ul>
@@ -698,7 +702,9 @@ CardTransactionManager prepareReadRecordFile(
698702
* <p><b>Nominal case</b>
699703
*
700704
* <p>The previously prepared commands are integrated into the calculation of the session digest
701-
* by the SAM before execution by the card by anticipating their responses.
705+
* by the SAM before execution by the card by anticipating their responses.<br>
706+
* Therefore, the previous prepared commands <b>should contain only modify commands</b>
707+
* (update/write/increase/decrease).
702708
*
703709
* <p>Thus, the session closing command containing the terminal signature is integrated into the
704710
* same APDU group sent to the card via a final card request.
@@ -740,9 +746,10 @@ CardTransactionManager prepareReadRecordFile(
740746
* </ul>
741747
*
742748
* @return The current instance.
743-
* @throws IllegalStateException If no session is open.
749+
* @throws IllegalStateException If no session is open or if previous prepared commands contain
750+
* non modify commands.
744751
* @throws CardTransactionException If a functional error occurs (including card and SAM IO
745-
* errors)
752+
* errors).
746753
* @since 1.0.0
747754
*/
748755
CardTransactionManager processClosing();

0 commit comments

Comments
 (0)