1 | <?php |
||
45 | class U2fError extends \Exception |
||
46 | { |
||
47 | /** Error for the authentication message not matching any outstanding |
||
48 | * authentication request */ |
||
49 | const ERR_NO_MATCHING_REQUEST = 1; |
||
50 | |||
51 | /** Error for the authentication message not matching any registration */ |
||
52 | const ERR_NO_MATCHING_REGISTRATION = 2; |
||
53 | |||
54 | /** Error for the signature on the authentication message not verifying with |
||
55 | * the correct key */ |
||
56 | const ERR_AUTHENTICATION_FAILURE = 3; |
||
57 | |||
58 | /** Error for the challenge in the registration message not matching the |
||
59 | * registration challenge */ |
||
60 | const ERR_UNMATCHED_CHALLENGE = 4; |
||
61 | |||
62 | /** Error for the attestation signature on the registration message not |
||
63 | * verifying */ |
||
64 | const ERR_ATTESTATION_SIGNATURE = 5; |
||
65 | |||
66 | /** Error for the attestation verification not verifying */ |
||
67 | const ERR_ATTESTATION_VERIFICATION = 6; |
||
68 | |||
69 | /** Error for not getting good random from the system */ |
||
70 | const ERR_BAD_RANDOM = 7; |
||
71 | |||
72 | /** Error when the counter is lower than expected */ |
||
73 | const ERR_COUNTER_TOO_LOW = 8; |
||
74 | |||
75 | /** Error decoding public key */ |
||
76 | const ERR_PUBKEY_DECODE = 9; |
||
77 | |||
78 | /** Error user-agent returned error */ |
||
79 | const ERR_BAD_UA_RETURNING = 10; |
||
80 | |||
81 | /** Error old OpenSSL version */ |
||
82 | const ERR_OLD_OPENSSL = 11; |
||
83 | |||
84 | /** |
||
85 | * Override constructor and make message and code mandatory |
||
86 | * @param string $message |
||
87 | * @param int $code |
||
88 | * @param \Exception|null $previous |
||
89 | */ |
||
90 | public function __construct($message, $code, \Exception $previous = null) { |
||
93 | } |