1 module ietf-tls-common {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-tls-common";
6 import iana-tls-cipher-suite-algs {
9 "RFC FFFF: YANG Groupings for TLS Clients and SSH Servers";
12 import ietf-crypto-types {
15 "RFC AAAA: YANG Data Types and Groupings for Cryptography";
18 import ietf-keystore {
21 "RFC CCCC: A YANG Data Model for a Keystore";
25 "IETF NETCONF (Network Configuration) Working Group";
28 "WG List: NETCONF WG list <mailto:netconf@ietf.org>
29 WG Web: https://datatracker.ietf.org/wg/netconf
30 Author: Kent Watsen <mailto:kent+ietf@watsen.net>
31 Author: Jeff Hartley <mailto:intensifysecurity@gmail.com>
32 Author: Gary Wu <mailto:garywu@cisco.com>";
35 "This module defines a common features and groupings for
36 Transport Layer Security (TLS).
38 Copyright (c) 2024 IETF Trust and the persons identified
39 as authors of the code. All rights reserved.
41 Redistribution and use in source and binary forms, with
42 or without modification, is permitted pursuant to, and
43 subject to the license terms contained in, the Revised
44 BSD License set forth in Section 4.c of the IETF Trust's
45 Legal Provisions Relating to IETF Documents
46 (https://trustee.ietf.org/license-info).
48 This version of this YANG module is part of RFC FFFF
49 (https://www.rfc-editor.org/info/rfcFFFF); see the RFC
50 itself for full legal notices.
52 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
53 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
54 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
55 are to be interpreted as described in BCP 14 (RFC 2119)
56 (RFC 8174) when, and only when, they appear in all
57 capitals, as shown here.";
63 "RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
71 "TLS Protocol Version 1.2 is supported. TLS 1.2 is obsolete
72 and thus it is NOT RECOMMENDED to enable this feature.";
74 "RFC 5246: The Transport Layer Security (TLS) Protocol
80 "TLS Protocol Version 1.3 is supported.";
82 "RFC 8446: The Transport Layer Security (TLS)
83 Protocol Version 1.3";
86 feature hello-params {
88 "TLS hello message parameters are configurable.";
91 feature algorithm-discovery {
93 "Indicates that the server implements the
94 'supported-algorithms' container.";
97 feature asymmetric-key-pair-generation {
99 "Indicates that the server implements the
100 'generate-asymmetric-key-pair' RPC.";
105 identity tls-version-base {
107 "Base identity used to identify TLS protocol versions.";
112 base tls-version-base;
115 "TLS Protocol Version 1.2.";
117 "RFC 5246: The Transport Layer Security (TLS) Protocol
123 base tls-version-base;
125 "TLS Protocol Version 1.3.";
127 "RFC 8446: The Transport Layer Security (TLS)
128 Protocol Version 1.3";
133 typedef epsk-supported-hash {
145 "As per Section 4.2.11 of RFC 8446, the hash algorithm
146 supported by an instance of an External Pre-Shared
149 "RFC 8446: The Transport Layer Security (TLS)
150 Protocol Version 1.3";
156 grouping hello-params-grouping {
158 "A reusable grouping for TLS hello message parameters.";
160 "RFC 5246: The Transport Layer Security (TLS) Protocol
162 RFC 8446: The Transport Layer Security (TLS) Protocol
164 container tls-versions {
166 "Parameters regarding TLS versions.";
167 leaf-list tls-version {
169 base tls-version-base;
173 "Acceptable TLS protocol versions.
175 If this leaf-list is not configured (has zero elements)
176 the acceptable TLS protocol versions are implementation-
180 container cipher-suites {
182 "Parameters regarding cipher suites.";
183 leaf-list cipher-suite {
185 base tlscsa:cipher-suite-alg-base;
189 "Acceptable cipher suites in order of descending
190 preference. The configured host key algorithms should
191 be compatible with the algorithm used by the configured
192 private key. Please see Section 5 of RFC FFFF for
195 If this leaf-list is not configured (has zero elements)
196 the acceptable cipher suites are implementation-
199 "RFC FFFF: YANG Groupings for TLS Clients and TLS Servers";
202 } // hello-params-grouping
205 // Protocol-accessible Nodes
207 container supported-algorithms {
208 if-feature "algorithm-discovery";
211 "A container for a list of cipher suite algorithms supported
213 leaf-list supported-algorithm {
214 type tlscsa:cipher-suite-algorithm-ref;
216 "A cipher suite algorithm supported by the server.";
220 rpc generate-asymmetric-key-pair {
221 if-feature "asymmetric-key-pair-generation";
223 "Requests the device to generate an asymmetric-key-pair
224 key using the specified key algorithm.";
227 type tlscsa:cipher-suite-algorithm-ref;
230 "The cipher suite algorithm that the generated key is
231 to work with. Implementations derive the public key
232 algorithm from the cipher suite algorithm. Example:
233 cipher suite 'tls-rsa-with-aes-256-cbc-sha256' maps
234 to the RSA public key.";
239 "Specifies the number of bits in the key to create.
240 For RSA keys, the minimum size is 1024 bits and
241 the default is 3072 bits. Generally, 3072 bits is
242 considered sufficient. DSA keys must be exactly 1024
243 bits as specified by FIPS 186-2. For elliptical
244 keys, the 'num-bits' value determines the key length
245 of the curve (e.g., 256, 384 or 521), where valid
246 values supported by the server are conveyed via an
247 unspecified mechanism. For some public algorithms,
248 the keys have a fixed length and thus the 'num-bits'
249 value is not specified.";
251 container private-key-encoding {
253 "Indicates how the private key is to be encoded.";
254 choice private-key-encoding {
257 "A choice amongst optional private key handling.";
259 if-feature "ct:cleartext-private-keys";
263 "Indicates that the private key is to be returned
264 as a cleartext value.";
268 if-feature "ct:encrypted-private-keys";
269 container encrypted {
271 "Indicates that the key is to be encrypted using
272 the specified symmetric or asymmetric key.";
273 uses ks:encrypted-by-grouping;
277 if-feature "ct:hidden-private-keys";
281 "Indicates that the private key is to be hidden.
283 Unlike the 'cleartext' and 'encrypt' options, the
284 key returned is a placeholder for an internally
285 stored key. See the 'Support for Built-in Keys'
286 section in RFC CCCC for information about hidden
294 uses ct:asymmetric-key-pair-grouping;
296 } // end generate-asymmetric-key-pair