1 | <?php |
||
5 | class CertificateException extends \RuntimeException implements ExceptionInterface |
||
6 | { |
||
7 | public static function invalidSignature() |
||
8 | { |
||
9 | return new static( |
||
10 | 'An error has occurred when verify signature, ' . self::openSSLError() |
||
11 | ); |
||
12 | } |
||
13 | |||
14 | 1 | public static function privateKey() |
|
20 | |||
21 | public static function publicKey() |
||
22 | { |
||
23 | return new static( |
||
24 | 'An error has occurred when read public key, ' . self::openSSLError() |
||
25 | ); |
||
26 | } |
||
27 | |||
28 | public static function signContent() |
||
29 | { |
||
30 | return new static( |
||
31 | 'An unexpected error has occurred when sign a content, ' . self::openSSLError() |
||
32 | ); |
||
33 | } |
||
34 | |||
35 | 1 | public static function unableToRead() |
|
41 | |||
42 | 2 | private static function openSSLError() |
|
50 | } |
||
51 |