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)
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/smbsrv/smb_signing.h
+++ new/usr/src/uts/common/fs/smbclnt/netsmb/smb_signing.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
|
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 - * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
13 + * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
14 14 */
15 15
16 16 #ifndef _SMB_SIGNING_H_
17 17 #define _SMB_SIGNING_H_
18 18
19 19 /*
20 - * SMB signing routines used in {smb,smb2}_signing.c
20 + * SMB signing routines used in {smb,smb2}_sign.c
21 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
22 + * uts/common/fs/smbclnt/netsmb/smb_sign_kcf.c
23 + * lib/smbclnt/libfknsmb/common/fksmb_sign_pkcs.c
24 24 */
25 25
26 26 #ifdef _KERNEL
27 27 #include <sys/crypto/api.h>
28 28 #else
29 29 #include <security/cryptoki.h>
30 30 #include <security/pkcs11.h>
31 31 #endif
32 32
33 33 #ifdef __cplusplus
34 34 extern "C" {
35 35 #endif
36 36
37 37 #define MD5_DIGEST_LENGTH 16 /* MD5 digest length in bytes */
38 38 #define SHA256_DIGEST_LENGTH 32 /* SHA256 digest length in bytes */
39 39 #define SMB2_SIG_SIZE 16
40 40
41 41 #ifdef _KERNEL
42 42 /* KCF variant */
43 43 typedef crypto_mechanism_t smb_sign_mech_t;
44 44 typedef crypto_context_t smb_sign_ctx_t;
45 45 #else /* _KERNEL */
46 46 /* PKCS11 variant */
47 47 typedef CK_MECHANISM smb_sign_mech_t;
48 48 typedef CK_SESSION_HANDLE smb_sign_ctx_t;
49 49 #endif /* _KERNEL */
50 50
51 51 /*
52 52 * SMB signing routines used in smb_signing.c
53 53 */
54 54
55 55 int smb_md5_getmech(smb_sign_mech_t *);
56 56 int smb_md5_init(smb_sign_ctx_t *, smb_sign_mech_t *);
57 57 int smb_md5_update(smb_sign_ctx_t, void *, size_t);
58 58 int smb_md5_final(smb_sign_ctx_t, uint8_t *);
59 59
60 60 /*
61 61 * SMB2 signing routines used in smb2_signing.c
62 62 */
63 63
64 64 int smb2_hmac_getmech(smb_sign_mech_t *);
65 65 int smb2_hmac_init(smb_sign_ctx_t *, smb_sign_mech_t *, uint8_t *, size_t);
66 66 int smb2_hmac_update(smb_sign_ctx_t, uint8_t *, size_t);
67 67 int smb2_hmac_final(smb_sign_ctx_t, uint8_t *);
68 68
69 69 #ifdef __cplusplus
70 70 }
71 71 #endif
72 72
73 73 #endif /* _SMB_SIGNING_H_ */
|
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX