Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
docs: Add a precision in "processOpening" and "processClosing" methods
Browse files Browse the repository at this point in the history
Closes #15
  • Loading branch information
andrei-cristea committed Dec 17, 2021
1 parent 89a7af7 commit 21f63c6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- Documentation of `processOpening` and `processClosing` methods (issue [#15]).

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

[#15]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/15
[#13]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/13
[#11]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/11
[#9]: https://github.com/calypsonet/calypsonet-terminal-calypso-java-api/issues/9
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = org.calypsonet.terminal
title = Calypsonet Terminal Calypso API
description = API defining the needed interfaces to manage Calypso cards
version = 1.0.3
version = 1.0.4

javaSourceLevel = 1.6
javaTargetLevel = 1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public interface CardTransactionManager {
*
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
*
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
* <p>Depending on whether we are inside a secure session, there are two types of behavior
* following this command:
*
* <ul>
Expand Down Expand Up @@ -157,7 +157,7 @@ public interface CardTransactionManager {
*
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
*
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
* <p>Depending on whether we are inside a secure session, there are two types of behavior
* following this command:
*
* <ul>
Expand Down Expand Up @@ -192,7 +192,7 @@ CardTransactionManager prepareReadRecordFile(
*
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
*
* <p>Depending on whether or not we are inside a secure session, there are two types of behavior
* <p>Depending on whether we are inside a secure session, there are two types of behavior
* following this command:
*
* <ul>
Expand All @@ -218,7 +218,7 @@ CardTransactionManager prepareReadRecordFile(
* Schedules the execution of a <b>Verify Pin</b> command without PIN presentation in order to get
* the attempt counter.
*
* <p>The PIN status will made available in CalypsoCard after the execution of process command.
* <p>The PIN status will be made available in CalypsoCard after the execution of process command.
* <br>
* Adds it to the list of commands to be sent with the next process command.
*
Expand Down Expand Up @@ -351,8 +351,8 @@ CardTransactionManager prepareReadRecordFile(
*
* <p>Once this command is processed, the result is available in {@link CalypsoCard}.
*
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link CalypsoCard#getSvLoadLogRecord()}
* ()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link
* CalypsoCard#getSvLoadLogRecord()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
* CalypsoCard#getSvDebitLogAllRecords()}.
*
* @param svOperation Informs about the nature of the intended operation: debit or reload.
Expand Down Expand Up @@ -476,8 +476,8 @@ CardTransactionManager prepareReadRecordFile(
* objects (see {@link CalypsoCard#getSvLoadLogRecord()} and {@link
* CalypsoCard#getSvDebitLogAllRecords()}).
*
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link CalypsoCard#getSvLoadLogRecord()}
* ()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
* <p>See the methods {@link CalypsoCard#getSvBalance()}, {@link
* CalypsoCard#getSvLoadLogRecord()}, {@link CalypsoCard#getSvDebitLogLastRecord()}, {@link
* CalypsoCard#getSvDebitLogAllRecords()}.
*
* @return The current instance.
Expand Down Expand Up @@ -555,7 +555,7 @@ CardTransactionManager prepareReadRecordFile(
CardTransactionManager processCardCommands();

/**
* Performs a PIN verification, in order to authenticate the card holder and/or unlock access to
* Performs a PIN verification, in order to authenticate the cardholder and/or unlock access to
* certain card files.
*
* <p>This command can be performed both in and out of a secure session. The PIN code can be
Expand Down Expand Up @@ -609,7 +609,7 @@ CardTransactionManager prepareReadRecordFile(
* <p>It is the starting point of the sequence:
*
* <ul>
* <li>{@link #processOpening(WriteAccessLevel)}
* <li>{@code processOpening(WriteAccessLevel)}
* <li>[{@link #processCardCommands()}]
* <li>[...]
* <li>[{@link #processCardCommands()}]
Expand All @@ -626,7 +626,7 @@ CardTransactionManager prepareReadRecordFile(
* object, otherwise a {@link IllegalStateException} is raised.
*
* <p>The secure session is opened with the {@link WriteAccessLevel} passed as an argument
* depending on whether it is a personalization, reload or debit transaction profile..
* depending on whether it is a personalization, reload or debit transaction profile.
*
* <p>The possible overflow of the internal session buffer of the card is managed in two ways
* depending on the setting chosen in {@link CardSecuritySetting}.
Expand Down Expand Up @@ -663,6 +663,10 @@ CardTransactionManager prepareReadRecordFile(
* card file then this one is replaced by a setting of the session opening command allowing the
* retrieval of this data in response to this command.
*
* <p>Please note that the CAAD mechanism may require a file to be read before being modified. For
* this mechanism to work properly, this reading must not be placed in the first position of the
* prepared commands in order to be correctly taken into account by the SAM.
*
* <p><b>Other operations carried out</b>
*
* <ul>
Expand Down Expand Up @@ -698,7 +702,9 @@ CardTransactionManager prepareReadRecordFile(
* <p><b>Nominal case</b>
*
* <p>The previously prepared commands are integrated into the calculation of the session digest
* by the SAM before execution by the card by anticipating their responses.
* by the SAM before execution by the card by anticipating their responses.<br>
* Therefore, the previous prepared commands <b>should contain only modify commands</b>
* (update/write/increase/decrease).
*
* <p>Thus, the session closing command containing the terminal signature is integrated into the
* same APDU group sent to the card via a final card request.
Expand Down Expand Up @@ -740,9 +746,10 @@ CardTransactionManager prepareReadRecordFile(
* </ul>
*
* @return The current instance.
* @throws IllegalStateException If no session is open.
* @throws IllegalStateException If no session is open or if previous prepared commands contain
* non modify commands.
* @throws CardTransactionException If a functional error occurs (including card and SAM IO
* errors)
* errors).
* @since 1.0.0
*/
CardTransactionManager processClosing();
Expand Down

0 comments on commit 21f63c6

Please sign in to comment.