Print this page
6723237 libcryptoutil should allow mechanism number "0x80000000" (the value of marker CKM_VENDOR_DEFINED)

*** 21,31 **** /* * 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" #include <cryptoutil.h> #include <fcntl.h> #include <libintl.h> #include <stdio.h> --- 21,31 ---- /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma ident "@(#)adm_uef.c 1.14 08/07/07 SMI" #include <cryptoutil.h> #include <fcntl.h> #include <libintl.h> #include <stdio.h>
*** 446,456 **** * mechanism list. */ for (j = 0; show_mechs && j < mech_count; j++) { CK_MECHANISM_TYPE mech = pmech_list[j]; ! if (mech > CKM_VENDOR_DEFINED) { (void) printf("%#lx", mech); } else { mech_name = pkcs11_mech2str(mech); (void) printf("%-29s", mech_name); } --- 446,456 ---- * mechanism list. */ for (j = 0; show_mechs && j < mech_count; j++) { CK_MECHANISM_TYPE mech = pmech_list[j]; ! if (mech >= CKM_VENDOR_DEFINED) { (void) printf("%#lx", mech); } else { mech_name = pkcs11_mech2str(mech); (void) printf("%-29s", mech_name); }
*** 1141,1151 **** 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) { (void) printf("%#lx", mech_id); } else { mech_name = pkcs11_mech2str( mech_id); if (mech_name == NULL) { --- 1141,1151 ---- 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) { (void) printf("%#lx", mech_id); } else { mech_name = pkcs11_mech2str( mech_id); if (mech_name == NULL) {