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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-crypto/cryptoadm/adm_metaslot.c
          +++ new/usr/src/cmd/cmd-crypto/cryptoadm/adm_metaslot.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "@(#)adm_metaslot.c     1.4     08/06/27 SMI"
       26 +#pragma ident   "@(#)adm_metaslot.c     1.5     08/07/07 SMI"
  27   27  
  28   28  /*
  29   29   * Administration for metaslot
  30   30   *
  31   31   * All the "list" operations will call functions in libpkcs11.so
  32   32   * Normally, it doesn't make sense to call functions in libpkcs11.so directly
  33   33   * because libpkcs11.so depends on the configuration file (pkcs11.conf) the
  34   34   * cryptoadm command is trying to administer.  However, since metaslot
  35   35   * is part of the framework, it is not possible to get information about
  36   36   * it without actually calling functions in libpkcs11.so.
↓ open down ↓ 241 lines elided ↑ open up ↑
 278  278                  (void) printf(gettext("No mechanisms\n"));
 279  279                  goto finish;
 280  280          }
 281  281          if (verbose) {
 282  282                  display_verbose_mech_header();
 283  283          }
 284  284  
 285  285          for (i = 0; i < mech_count; i++) {
 286  286                  CK_MECHANISM_TYPE       mech = pmech_list[i];
 287  287  
 288      -                if (mech > CKM_VENDOR_DEFINED) {
      288 +                if (mech >= CKM_VENDOR_DEFINED) {
 289  289                          (void) printf("%#lx", mech);
 290  290                  } else {
 291  291                          (void) printf("%-29s", pkcs11_mech2str(mech));
 292  292                  }
 293  293  
 294  294                  if (verbose) {
 295  295                          CK_MECHANISM_INFO mech_info;
 296  296                          rv = funcs->C_GetMechanismInfo(METASLOT_ID,
 297  297                              mech, &mech_info);
 298  298                          if (rv != CKR_OK) {
↓ open down ↓ 243 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX