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

Commit 698c6b3

Browse files
feat: add ProductType identifier for HSM C1 (#48)
1 parent 446f2ae commit 698c6b3

8 files changed

+148
-322
lines changed

CHANGELOG.md

+2
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+
### Added
9+
- `CalypsoSam.ProductType.HSM_C1` identifier for HSM products.
810

911
## [1.2.0] - 2022-05-30
1012
### Added

gradle.properties

+1-1
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.2.0
4+
version = 1.3.0
55

66
javaSourceLevel = 1.6
77
javaTargetLevel = 1.6

src/main/java/org/calypsonet/terminal/calypso/CalypsoApiProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class CalypsoApiProperties {
2323
*
2424
* @since 1.0.0
2525
*/
26-
public static final String VERSION = "1.2";
26+
public static final String VERSION = "1.3";
2727

2828
/** Private constructor */
2929
private CalypsoApiProperties() {}

src/main/java/org/calypsonet/terminal/calypso/sam/CalypsoSam.java

+7
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ enum ProductType {
106106
*/
107107
SAM_C1,
108108

109+
/**
110+
* SAM C1 HSM
111+
*
112+
* @since 1.3.0
113+
*/
114+
HSM_C1,
115+
109116
/**
110117
* SAM S1E1
111118
*

src/main/uml/api_class_diagram.puml

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@startuml
22
title
3-
Calypsonet - calypsonet-terminal-calypso-java-api - 1.2.+ (2022-05-05)
3+
Calypsonet - calypsonet-terminal-calypso-java-api - 1.3.+ (2022-10-04)
44
end title
55

66
' == THEME ==
@@ -264,6 +264,7 @@ package "org.calypsonet.terminal.calypso" as api {
264264
}
265265
+enum "ProductType" as SamProductType {
266266
SAM_C1
267+
HSM_C1
267268
SAM_S1E1
268269
SAM_S1Dx
269270
CSAM_F
@@ -418,6 +419,21 @@ package "org.calypsonet.terminal.calypso" as api {
418419
}
419420
+interface SamSecuritySetting extends CommonSecuritySetting {
420421
}
422+
' Exceptions
423+
+class "<<RuntimeException>>" as RuntimeException {
424+
+**SessionBufferOverflowException**: Session buffer would overflow for atomic session.
425+
+**UnauthorizedKeyException**
426+
+**CardRevokedException**
427+
+**SamRevokedException**
428+
+**InconsistentDataException**: Number of R-APDUs != number of C-APDUs **or** data read in session != data read outside session.
429+
+**InvalidSignatureException**: R-APDU of PSO Verify Signature = 6988.
430+
+**InvalidCardSignatureException**: R-APDU of DigestAuthenticate = 6988 **or** R-APDU of SvCheck = 6988.
431+
+**CardSignatureNotVerifiableException**: R-APDU of CloseSecureSession = 9000 but SAM is no more available.
432+
+**UnexpectedCommandStatusException**
433+
+**ReaderIOException**: Card reader and/or SAM reader communication is broken.
434+
+**CardIOException**
435+
+**SamIOException**
436+
}
421437
}
422438
}
423439

src/main/uml/api_class_diagram.svg

+120-88
Loading

src/main/uml/api_exceptions_class_diagram.puml

-79
This file was deleted.

src/main/uml/api_exceptions_class_diagram.svg

-152
This file was deleted.

0 commit comments

Comments
 (0)