@@ -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