Print this page
5031131 perf: pkcs11_kernel can benefit from a more efficient pkcs11_mech2str()

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libcryptoutil/common/cryptoutil.h
          +++ new/usr/src/lib/libcryptoutil/common/cryptoutil.h
↓ open down ↓ 18 lines elided ↑ open up ↑
  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   26  #ifndef _CRYPTOUTIL_H
  27   27  #define _CRYPTOUTIL_H
  28   28  
  29      -#pragma ident   "@(#)cryptoutil.h       1.11    08/02/20 SMI"
       29 +#pragma ident   "@(#)cryptoutil.h       1.12    08/06/27 SMI"
  30   30  
  31   31  #ifdef __cplusplus
  32   32  extern "C" {
  33   33  #endif
  34   34  
  35   35  #include <sys/types.h>
  36   36  #include <syslog.h>
  37   37  #include <security/cryptoki.h>
  38   38  #include <sys/param.h>
  39   39  
↓ open down ↓ 67 lines elided ↑ open up ↑
 107  107  
 108  108  typedef struct uentrylist {
 109  109          uentry_t        *puent;
 110  110          struct uentrylist       *next;
 111  111  } uentrylist_t;
 112  112  
 113  113  extern void cryptodebug(const char *fmt, ...);
 114  114  extern void cryptoerror(int priority, const char *fmt, ...);
 115  115  extern void cryptodebug_init(const char *prefix);
 116  116  
 117      -extern char *pkcs11_mech2str(CK_MECHANISM_TYPE mech);
      117 +extern const char *pkcs11_mech2str(CK_MECHANISM_TYPE mech);
 118  118  extern CK_RV pkcs11_str2mech(char *mech_str, CK_MECHANISM_TYPE_PTR mech);
 119  119  
 120  120  extern int get_pkcs11conf_info(uentrylist_t **);
 121  121  extern umechlist_t *create_umech(char *);
 122  122  extern void free_umechlist(umechlist_t *);
 123  123  extern void free_uentrylist(uentrylist_t *);
 124  124  extern void free_uentry(uentry_t *);
 125  125  extern uentry_t *getent_uef(char *);
 126  126  
 127  127  extern void tohexstr(uchar_t *bytes, size_t blen, char *hexstr, size_t hexlen);
↓ open down ↓ 26 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX