| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * softoknt.h - public data structures for the software token library | |
| 3 * | |
| 4 * This Source Code Form is subject to the terms of the Mozilla Public | |
| 5 * License, v. 2.0. If a copy of the MPL was not distributed with this | |
| 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
| 7 /* $Id: softoknt.h,v 1.8 2013/02/05 02:19:52 ryan.sleevi%gmail.com Exp $ */ | |
| 8 | |
| 9 #ifndef _SOFTOKNT_H_ | |
| 10 #define _SOFTOKNT_H_ | |
| 11 | |
| 12 /* | |
| 13 * RSA block types | |
| 14 * | |
| 15 * The actual values are important -- they are fixed, *not* arbitrary. | |
| 16 * The explicit value assignments are not needed (because C would give | |
| 17 * us those same values anyway) but are included as a reminder... | |
| 18 */ | |
| 19 typedef enum { | |
| 20 RSA_BlockPrivate0 = 0, /* unused, really */ | |
| 21 RSA_BlockPrivate = 1, /* pad for a private-key operation */ | |
| 22 RSA_BlockPublic = 2, /* pad for a public-key operation */ | |
| 23 RSA_BlockRaw = 4, /* simply justify the block appropriately */ | |
| 24 RSA_BlockTotal | |
| 25 } RSA_BlockType; | |
| 26 | |
| 27 #define NSS_SOFTOKEN_DEFAULT_CHUNKSIZE 2048 | |
| 28 | |
| 29 /* | |
| 30 * FIPS 140-2 auditing | |
| 31 */ | |
| 32 typedef enum { | |
| 33 NSS_AUDIT_ERROR = 3, /* errors */ | |
| 34 NSS_AUDIT_WARNING = 2, /* warning messages */ | |
| 35 NSS_AUDIT_INFO = 1 /* informational messages */ | |
| 36 } NSSAuditSeverity; | |
| 37 | |
| 38 typedef enum { | |
| 39 NSS_AUDIT_ACCESS_KEY = 0, | |
| 40 NSS_AUDIT_CHANGE_KEY, | |
| 41 NSS_AUDIT_COPY_KEY, | |
| 42 NSS_AUDIT_CRYPT, | |
| 43 NSS_AUDIT_DERIVE_KEY, | |
| 44 NSS_AUDIT_DESTROY_KEY, | |
| 45 NSS_AUDIT_DIGEST_KEY, | |
| 46 NSS_AUDIT_FIPS_STATE, | |
| 47 NSS_AUDIT_GENERATE_KEY, | |
| 48 NSS_AUDIT_INIT_PIN, | |
| 49 NSS_AUDIT_INIT_TOKEN, | |
| 50 NSS_AUDIT_LOAD_KEY, | |
| 51 NSS_AUDIT_LOGIN, | |
| 52 NSS_AUDIT_LOGOUT, | |
| 53 NSS_AUDIT_SELF_TEST, | |
| 54 NSS_AUDIT_SET_PIN, | |
| 55 NSS_AUDIT_UNWRAP_KEY, | |
| 56 NSS_AUDIT_WRAP_KEY | |
| 57 } NSSAuditType; | |
| 58 | |
| 59 #endif /* _SOFTOKNT_H_ */ | |
| OLD | NEW |