Print this page
1667 pkcs11 may deadlock when multi-threaded consumers fork

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libcryptoutil/common/cryptoutil.h
          +++ new/usr/src/lib/libcryptoutil/common/cryptoutil.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  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   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  22   22   */
  23   23  /*
  24   24   * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
       25 + * Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
  25   26   */
  26   27  
  27   28  #ifndef _CRYPTOUTIL_H
  28   29  #define _CRYPTOUTIL_H
  29   30  
  30   31  #ifdef __cplusplus
  31   32  extern "C" {
  32   33  #endif
  33   34  
  34   35  #include <sys/types.h>
↓ open down ↓ 174 lines elided ↑ open up ↑
 209  210  extern int str2lifetime(char *ltimestr, uint32_t *ltime);
 210  211  
 211  212  extern char *pkcs11_default_token(void);
 212  213  extern int pkcs11_get_pass(char *token_name, char **pdata, size_t *psize,
 213  214      size_t min_psize, boolean_t with_confirmation);
 214  215  
 215  216  extern int pkcs11_seed_urandom(void *sbuf, size_t slen);
 216  217  extern int pkcs11_get_random(void *dbuf, size_t dlen);
 217  218  extern int pkcs11_get_urandom(void *dbuf, size_t dlen);
 218  219  extern int pkcs11_get_nzero_urandom(void *dbuf, size_t dlen);
 219      -extern void pkcs11_close_random(void);
 220      -extern void pkcs11_close_urandom(void);
 221      -extern void pkcs11_close_urandom_seed(void);
 222  220  extern int pkcs11_read_data(char *filename, void **dbuf, size_t *dlen);
 223  221  
 224  222  extern int open_nointr(const char *path, int oflag, ...);
 225  223  extern ssize_t readn_nointr(int fd, void *dbuf, size_t dlen);
 226  224  extern ssize_t writen_nointr(int fd, void *dbuf, size_t dlen);
 227  225  extern int update_conf(char *conf_file, char *entry);
 228  226  
 229  227  extern int pkcs11_parse_uri(const char *str, pkcs11_uri_t *uri);
 230  228  extern void pkcs11_free_uri(pkcs11_uri_t *uri);
 231  229  
 232  230  #ifdef __cplusplus
 233  231  }
 234  232  #endif
 235  233  
 236  234  #endif /* _CRYPTOUTIL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX