You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cryptoki/src/error/rv_error.rs
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
//! Function types
4
4
5
+
use cryptoki_sys::CK_RV;
5
6
use std::fmt;
6
7
7
8
#[derive(Debug,Copy,Clone,PartialEq,Eq)]
@@ -193,8 +194,8 @@ pub enum RvError {
193
194
PublicKeyInvalid,
194
195
/// The signature request is rejected by the user.
195
196
FunctionRejected,
196
-
/// CKR_VENDOR_DEFINED
197
-
VendorDefined,
197
+
/// A vendor defined error code, CKR_VENDOR_DEFINED and above.
198
+
VendorDefined(CK_RV),
198
199
}
199
200
200
201
impl fmt::DisplayforRvError{
@@ -293,7 +294,7 @@ impl fmt::Display for RvError {
293
294
RvError::PinTooWeak => write!(f,"The specified PIN is too weak so that it could be easy to guess. If the PIN is too short, CKR_PIN_LEN_RANGE should be returned instead. This return code only applies to functions which attempt to set a PIN."),
294
295
RvError::PublicKeyInvalid => write!(f,"The public key fails a public key validation. For example, an EC public key fails the public key validation specified in Section 5.2.2 of ANSI X9.62. This error code may be returned by C_CreateObject, when the public key is created, or by C_VerifyInit or C_VerifyRecoverInit, when the public key is used. It may also be returned by C_DeriveKey, in preference to CKR_MECHANISM_PARAM_INVALID, if the other party's public key specified in the mechanism's parameters is invalid."),
295
296
RvError::FunctionRejected => write!(f,"The signature request is rejected by the user."),
0 commit comments