@@ -15,89 +15,91 @@ class ClientCertificateAuthentication implements AuthenticationInterface
15
15
/**
16
16
* @var string
17
17
*/
18
- private $ caCertificatePath ;
18
+ private $ caCertPath ;
19
+
19
20
/**
20
21
* @var string
21
22
*/
22
- private $ clientCertificatePath ;
23
+ private $ clientCertPath ;
24
+
23
25
/**
24
26
* @var string
25
27
*/
26
- private $ clientCertificatePassword ;
28
+ private $ clientCertPassword ;
27
29
28
30
/**
29
31
* ClientCertificateAuthentication constructor.
30
32
*
31
- * @param string $caCertificatePath
32
- * @param string $clientCertificatePath
33
- * @param string $clientCertificatePassword
33
+ * @param string $caCertPath
34
+ * @param string $clientCertPath
35
+ * @param string $clientCertPassword
34
36
*/
35
- public function __construct ($ caCertificatePath , $ clientCertificatePath , $ clientCertificatePassword )
37
+ public function __construct ($ caCertPath , $ clientCertPath , $ clientCertPassword )
36
38
{
37
- $ this ->setCaCertificatePath ( $ caCertificatePath );
38
- $ this ->setClientCertificatePath ( $ clientCertificatePath );
39
- $ this ->setClientCertificatePassword ( $ clientCertificatePassword );
39
+ $ this ->setCaCertPath ( $ caCertPath );
40
+ $ this ->setClientCertPath ( $ clientCertPath );
41
+ $ this ->setClientCertPassword ( $ clientCertPassword );
40
42
}
41
43
42
44
/**
43
45
* @return mixed
44
46
*/
45
- public function getCaCertificatePath ()
47
+ public function getCaCertPath ()
46
48
{
47
- return $ this ->caCertificatePath ;
49
+ return $ this ->caCertPath ;
48
50
}
49
51
50
52
/**
51
- * @param mixed $caCertificatePath
53
+ * @param mixed $caCertPath
52
54
* @return $this
53
55
* @throws FileReadableException
54
56
*/
55
- public function setCaCertificatePath ( $ caCertificatePath )
57
+ public function setCaCertPath ( $ caCertPath )
56
58
{
57
- if (!is_file ($ caCertificatePath )) {
59
+ if (!is_file ($ caCertPath )) {
58
60
throw new FileReadableException ('CA certificate file not readable. ' );
59
61
}
60
- $ this ->caCertificatePath = $ caCertificatePath ;
62
+ $ this ->caCertPath = $ caCertPath ;
61
63
return $ this ;
62
64
}
63
65
64
66
/**
65
67
* @return mixed
66
68
*/
67
- public function getClientCertificatePath ()
69
+ public function getClientCertPath ()
68
70
{
69
- return $ this ->clientCertificatePath ;
71
+ return $ this ->clientCertPath ;
70
72
}
71
73
72
74
/**
73
- * @param mixed $clientCertificatePath
75
+ * @param mixed $clientCertPath
74
76
* @return $this
75
77
* @throws FileReadableException
76
78
*/
77
- public function setClientCertificatePath ( $ clientCertificatePath )
79
+ public function setClientCertPath ( $ clientCertPath )
78
80
{
79
- if (!is_file ($ clientCertificatePath )) {
81
+ if (!is_file ($ clientCertPath )) {
80
82
throw new FileReadableException ('Client certificate file not readable. ' );
81
83
}
82
- $ this ->clientCertificatePath = $ clientCertificatePath ;
84
+ $ this ->clientCertPath = $ clientCertPath ;
83
85
return $ this ;
84
86
}
85
87
86
88
/**
87
89
* @return mixed
88
90
*/
89
- public function getClientCertificatePassword ()
91
+ public function getClientCertPassword ()
90
92
{
91
- return $ this ->clientCertificatePassword ;
93
+ return $ this ->clientCertPassword ;
92
94
}
93
95
94
96
/**
95
- * @param mixed $clientCertificatePassword
97
+ * @param mixed $clientCertPassword
96
98
* @return $this
97
99
*/
98
- public function setClientCertificatePassword ( $ clientCertificatePassword )
100
+ public function setClientCertPassword ( $ clientCertPassword )
99
101
{
100
- $ this ->clientCertificatePassword = $ clientCertificatePassword ;
102
+ $ this ->clientCertPassword = $ clientCertPassword ;
101
103
return $ this ;
102
104
}
103
105
@@ -107,9 +109,9 @@ public function setClientCertificatePassword($clientCertificatePassword)
107
109
*/
108
110
public function configureCurl ($ curl )
109
111
{
110
- curl_setopt ($ curl , CURLOPT_CAINFO , $ this ->caCertificatePath );
111
- curl_setopt ($ curl , CURLOPT_SSLCERT , $ this ->clientCertificatePath );
112
- curl_setopt ($ curl , CURLOPT_SSLCERTPASSWD , $ this ->clientCertificatePassword );
112
+ curl_setopt ($ curl , CURLOPT_CAINFO , $ this ->caCertPath );
113
+ curl_setopt ($ curl , CURLOPT_SSLCERT , $ this ->clientCertPath );
114
+ curl_setopt ($ curl , CURLOPT_SSLCERTPASSWD , $ this ->clientCertPassword );
113
115
return $ this ;
114
116
}
115
117
0 commit comments