Print this page
NEX-16818 Add fksmbcl development tool
NEX-17264 SMB client test tp_smbutil_013 fails after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
and: (fix ref leaks)
   1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  14  */
  15 
  16 #ifndef _SMB_SIGNING_H_
  17 #define _SMB_SIGNING_H_
  18 
  19 /*
  20  * SMB signing routines used in {smb,smb2}_signing.c
  21  * Two implementations of these (kernel/user) in:
  22  *      uts/common/fs/smbsrv/smb_sign_kcf.c
  23  *      lib/smbsrv/libfksmbsrv/common/fksmb_sign_pkcs.c
  24  */
  25 
  26 #ifdef  _KERNEL
  27 #include <sys/crypto/api.h>
  28 #else
  29 #include <security/cryptoki.h>
  30 #include <security/pkcs11.h>
  31 #endif
  32 
  33 #ifdef __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #define MD5_DIGEST_LENGTH       16      /* MD5 digest length in bytes */
  38 #define SHA256_DIGEST_LENGTH    32      /* SHA256 digest length in bytes */
  39 #define SMB2_SIG_SIZE           16
  40 
  41 #ifdef  _KERNEL
  42 /* KCF variant */
  43 typedef crypto_mechanism_t      smb_sign_mech_t;


   1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  14  */
  15 
  16 #ifndef _SMB_SIGNING_H_
  17 #define _SMB_SIGNING_H_
  18 
  19 /*
  20  * SMB signing routines used in {smb,smb2}_sign.c
  21  * Two implementations of these (kernel/user) in:
  22  *      uts/common/fs/smbclnt/netsmb/smb_sign_kcf.c
  23  *      lib/smbclnt/libfknsmb/common/fksmb_sign_pkcs.c
  24  */
  25 
  26 #ifdef  _KERNEL
  27 #include <sys/crypto/api.h>
  28 #else
  29 #include <security/cryptoki.h>
  30 #include <security/pkcs11.h>
  31 #endif
  32 
  33 #ifdef __cplusplus
  34 extern "C" {
  35 #endif
  36 
  37 #define MD5_DIGEST_LENGTH       16      /* MD5 digest length in bytes */
  38 #define SHA256_DIGEST_LENGTH    32      /* SHA256 digest length in bytes */
  39 #define SMB2_SIG_SIZE           16
  40 
  41 #ifdef  _KERNEL
  42 /* KCF variant */
  43 typedef crypto_mechanism_t      smb_sign_mech_t;