Skip to content

Commit 15ae898

Browse files
committed
Merge branch 'RM-3832_fix_binary_backwards_compatibility' into 'master'
RM-3832: fix binary backward compatibility between cdoc2-lib:2.0.1:test-jar... See merge request cdoc2/cdoc2-java-ref-impl!59
2 parents c1edba4 + afc0606 commit 15ae898

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

cdoc2-lib/src/test/java/ee/cyber/cdoc2/crypto/Pkcs11DeviceConfiguration.java

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Pkcs11DeviceConfiguration {
1919
private static final Logger log = LoggerFactory.getLogger(Pkcs11DeviceConfiguration.class);
2020

2121
public Pkcs11DeviceConfiguration() {
22-
load();
22+
this.loadInternal();
2323
}
2424

2525
private String pkcs11Library;
@@ -36,30 +36,63 @@ public String getPkcs11Library() {
3636
return pkcs11Library;
3737
}
3838

39+
@Deprecated(since = "2.0.1")
40+
public String pkcs11Library() {
41+
return getPkcs11Library();
42+
}
43+
3944
public int getSlot() {
4045
return slot;
4146
}
4247

48+
@Deprecated(since = "2.0.1")
49+
public int slot() {
50+
return getSlot();
51+
}
52+
4353
public char[] getPin() {
4454
return pin;
4555
}
4656

57+
@Deprecated(since = "2.0.1")
58+
public char[] pin() {
59+
return getPin();
60+
}
61+
4762
@Nullable
4863
public String getKeyAlias() {
4964
return keyAlias;
5065
}
5166

67+
@Deprecated(since = "2.0.1")
68+
public String keyAlias() {
69+
return getKeyAlias();
70+
}
71+
5272
public String getCertCn() {
5373
return certCn;
5474
}
5575

76+
@Deprecated(since = "2.0.1")
77+
public String certCn() {
78+
return getCertCn();
79+
}
80+
81+
/**
82+
* @deprecated Use {@link #Pkcs11DeviceConfiguration()} instead.
83+
*/
84+
@Deprecated(since = "2.0.1")
85+
public static Pkcs11DeviceConfiguration load() {
86+
return new Pkcs11DeviceConfiguration();
87+
}
88+
5689
/**
5790
* Loads the PKCS11 device configuration from a file on the classpath.
5891
* <p>
5992
* The properties file can be specified with the system property cdoc2.pkcs11.test-configuration
6093
* e.g -D cdoc2.pkcs11.test-configuration=pkcs11-test-idcard.properties
6194
*/
62-
private void load() {
95+
private void loadInternal() {
6396
final String classpath = "classpath:";
6497
String filename = System.getProperty(
6598
"cdoc2.pkcs11.conf-file",

0 commit comments

Comments
 (0)