Print this page
6723237 libcryptoutil should allow mechanism number "0x80000000" (the value of marker CKM_VENDOR_DEFINED)
@@ -21,11 +21,11 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "@(#)adm_uef.c 1.13 08/06/27 SMI"
+#pragma ident "@(#)adm_uef.c 1.14 08/07/07 SMI"
#include <cryptoutil.h>
#include <fcntl.h>
#include <libintl.h>
#include <stdio.h>
@@ -446,11 +446,11 @@
* mechanism list.
*/
for (j = 0; show_mechs && j < mech_count; j++) {
CK_MECHANISM_TYPE mech = pmech_list[j];
- if (mech > CKM_VENDOR_DEFINED) {
+ if (mech >= CKM_VENDOR_DEFINED) {
(void) printf("%#lx", mech);
} else {
mech_name = pkcs11_mech2str(mech);
(void) printf("%-29s", mech_name);
}
@@ -1141,11 +1141,11 @@
mech_id = strtoul(ptr->name, NULL, 0);
if (mech_id & CKO_VENDOR_DEFINED) {
/* vendor defined mechanism */
(void) printf("%s", ptr->name);
} else {
- if (mech_id > CKM_VENDOR_DEFINED) {
+ if (mech_id >= CKM_VENDOR_DEFINED) {
(void) printf("%#lx", mech_id);
} else {
mech_name = pkcs11_mech2str(
mech_id);
if (mech_name == NULL) {