summaryrefslogtreecommitdiff
path: root/pkcs11.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-12-05 10:22:03 +1100
committerDamien Miller <djm@mindrot.org>2013-12-05 10:22:03 +1100
commit1d2f8804a6d33a4e908b876b2e1266b8260ec76b (patch)
treed82c7ac965aff9b5836e4cfdd994544d25b1a783 /pkcs11.h
parentbdb352a54f82df94a548e3874b22f2d6ae90328d (diff)
- deraadt@cvs.openbsd.org 2013/11/26 19:15:09
[pkcs11.h] cleanup 1 << 31 idioms. Resurrection of this issue pointed out by Eitan Adler ok markus for ssh, implies same change in kerberosV
Diffstat (limited to 'pkcs11.h')
-rw-r--r--pkcs11.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkcs11.h b/pkcs11.h
index 2cde5b3f4..b01d58f94 100644
--- a/pkcs11.h
+++ b/pkcs11.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs11.h,v 1.2 2010/02/24 06:12:53 djm Exp $ */ 1/* $OpenBSD: pkcs11.h,v 1.3 2013/11/26 19:15:09 deraadt Exp $ */
2/* pkcs11.h 2/* pkcs11.h
3 Copyright 2006, 2007 g10 Code GmbH 3 Copyright 2006, 2007 g10 Code GmbH
4 Copyright 2006 Andreas Jellinghaus 4 Copyright 2006 Andreas Jellinghaus
@@ -319,7 +319,7 @@ typedef unsigned long ck_object_class_t;
319#define CKO_HW_FEATURE (5) 319#define CKO_HW_FEATURE (5)
320#define CKO_DOMAIN_PARAMETERS (6) 320#define CKO_DOMAIN_PARAMETERS (6)
321#define CKO_MECHANISM (7) 321#define CKO_MECHANISM (7)
322#define CKO_VENDOR_DEFINED ((unsigned long) (1 << 31)) 322#define CKO_VENDOR_DEFINED (1U << 31)
323 323
324 324
325typedef unsigned long ck_hw_feature_type_t; 325typedef unsigned long ck_hw_feature_type_t;
@@ -327,7 +327,7 @@ typedef unsigned long ck_hw_feature_type_t;
327#define CKH_MONOTONIC_COUNTER (1) 327#define CKH_MONOTONIC_COUNTER (1)
328#define CKH_CLOCK (2) 328#define CKH_CLOCK (2)
329#define CKH_USER_INTERFACE (3) 329#define CKH_USER_INTERFACE (3)
330#define CKH_VENDOR_DEFINED ((unsigned long) (1 << 31)) 330#define CKH_VENDOR_DEFINED (1U << 31)
331 331
332 332
333typedef unsigned long ck_key_type_t; 333typedef unsigned long ck_key_type_t;
@@ -357,14 +357,14 @@ typedef unsigned long ck_key_type_t;
357#define CKK_AES (0x1f) 357#define CKK_AES (0x1f)
358#define CKK_BLOWFISH (0x20) 358#define CKK_BLOWFISH (0x20)
359#define CKK_TWOFISH (0x21) 359#define CKK_TWOFISH (0x21)
360#define CKK_VENDOR_DEFINED ((unsigned long) (1 << 31)) 360#define CKK_VENDOR_DEFINED (1U << 31)
361 361
362typedef unsigned long ck_certificate_type_t; 362typedef unsigned long ck_certificate_type_t;
363 363
364#define CKC_X_509 (0) 364#define CKC_X_509 (0)
365#define CKC_X_509_ATTR_CERT (1) 365#define CKC_X_509_ATTR_CERT (1)
366#define CKC_WTLS (2) 366#define CKC_WTLS (2)
367#define CKC_VENDOR_DEFINED ((unsigned long) (1 << 31)) 367#define CKC_VENDOR_DEFINED (1U << 31)
368 368
369 369
370typedef unsigned long ck_attribute_type_t; 370typedef unsigned long ck_attribute_type_t;
@@ -453,7 +453,7 @@ typedef unsigned long ck_attribute_type_t;
453#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x211) 453#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x211)
454#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x212) 454#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE | 0x212)
455#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x600) 455#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE | 0x600)
456#define CKA_VENDOR_DEFINED ((unsigned long) (1 << 31)) 456#define CKA_VENDOR_DEFINED (1U << 31)
457 457
458 458
459struct ck_attribute 459struct ck_attribute
@@ -672,7 +672,7 @@ typedef unsigned long ck_mechanism_type_t;
672#define CKM_DSA_PARAMETER_GEN (0x2000) 672#define CKM_DSA_PARAMETER_GEN (0x2000)
673#define CKM_DH_PKCS_PARAMETER_GEN (0x2001) 673#define CKM_DH_PKCS_PARAMETER_GEN (0x2001)
674#define CKM_X9_42_DH_PARAMETER_GEN (0x2002) 674#define CKM_X9_42_DH_PARAMETER_GEN (0x2002)
675#define CKM_VENDOR_DEFINED ((unsigned long) (1 << 31)) 675#define CKM_VENDOR_DEFINED (1U << 31)
676 676
677 677
678struct ck_mechanism 678struct ck_mechanism
@@ -703,7 +703,7 @@ struct ck_mechanism_info
703#define CKF_WRAP (1 << 17) 703#define CKF_WRAP (1 << 17)
704#define CKF_UNWRAP (1 << 18) 704#define CKF_UNWRAP (1 << 18)
705#define CKF_DERIVE (1 << 19) 705#define CKF_DERIVE (1 << 19)
706#define CKF_EXTENSION ((unsigned long) (1 << 31)) 706#define CKF_EXTENSION (1U << 31)
707 707
708 708
709/* Flags for C_WaitForSlotEvent. */ 709/* Flags for C_WaitForSlotEvent. */
@@ -1179,7 +1179,7 @@ struct ck_c_initialize_args
1179#define CKR_MUTEX_BAD (0x1a0) 1179#define CKR_MUTEX_BAD (0x1a0)
1180#define CKR_MUTEX_NOT_LOCKED (0x1a1) 1180#define CKR_MUTEX_NOT_LOCKED (0x1a1)
1181#define CKR_FUNCTION_REJECTED (0x200) 1181#define CKR_FUNCTION_REJECTED (0x200)
1182#define CKR_VENDOR_DEFINED ((unsigned long) (1 << 31)) 1182#define CKR_VENDOR_DEFINED (1U << 31)
1183 1183
1184 1184
1185 1185