<commit_before>"""
OpenVpn 2.3 specific JSON-Schema definition
"""
from copy import deepcopy

from ...schema import schema as default_schema

base_openvpn_schema = {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "additionalProperties": True,
    "definitions": {
        "tunnel": {
            "type": "object",
            "required": ["name", "mode", "proto", "dev"],
            "properties": {
                "name": {
                    "title": "name",
                    "description": "descriptive name for internal use, (only alphanumeric "
                    "characters, dashes and underscores allowed)",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 24,
                    "pattern": "^[0-9A-Za-z_-]*$",
                    "propertyOrder": 0,
                },
                "mode": {"title": "mode", "type": "string", "propertyOrder": 2},
                "proto": {"title": "protocol", "type": "string", "propertyOrder": 3},
                "port": {
                    "title": "port",
                    "type": "integer",
                    "default": 1194,
                    "maximum": 65535,
                    "minimum": 1,
                    "propertyOrder": 4,
                },
                "dev_type": {
                    "title": "device type",
                    "description": "tun (layer3) or tap (layer2)",
                    "type": "string",
                    "enum": ["tun", "tap"],
                    "propertyOrder": 5,
                },
                "dev": {
                    "title": "device name",
                    "description": "VPN interface name",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 15,
                    "pattern": "^[^\\s]*$",
                    "propertyOrder": 6,
                },
                "local": {
                    "title": "local",
                    "type": "string",
                    "description": "Local hostname or IP address on which OpenVPN will listen to. "
                    "If unspecified, OpenVPN will bind to all interfaces.",
                    "propertyOrder": 8,
                },
                "comp_lzo": {
                    "title": "LZO compression",
                    "description": "Use fast LZO compression; may add up to 1 "
                    "byte per packet for incompressible data",
                    "type": "string",
                    "enum": ["yes", "no", "adaptive"],
                    "default": "adaptive",
                    "propertyOrder": 9,
                },
                "auth": {
                    "title": "auth digest algorithm",
                    "type": "string",
                    "enum": [
                        "DSA",
                        "DSA-SHA",
                        "DSA-SHA1",
                        "DSA-SHA1-old",
                        "MD4",
                        "MD5",
                        "MDC2",
                        "RIPEMD160",
                        "RSA-MD4",
                        "RSA-MD5",
                        "RSA-MDC2",
                        "RSA-RIPEMD160",
                        "RSA-SHA",
                        "RSA-SHA1",
                        "RSA-SHA1-2",
                        "RSA-SHA224",
                        "RSA-SHA256",
                        "RSA-SHA384",
                        "RSA-SHA512",
                        "SHA",
                        "SHA1",
                        "SHA224",
                        "SHA256",
                        "SHA384",
                        "SHA512",
                        "ecdsa-with-SHA1",
                        "whirlpool",
                        "none",
                    ],
                    "default": "SHA1",
                    "propertyOrder": 11,
                },
                "cipher": {
                    "title": "cipher",
                    "type": "string",
                    "description": "Encrypt data channel packets with cipher algorithm",
                    "enum": [
                        "AES-128-CBC",
                        "AES-128-CFB",
                        "AES-128-CFB1",
                        "AES-128-CFB8",
                        "AES-128-OFB",
                        "AES-192-CBC",
                        "AES-192-CFB",
                        "AES-192-CFB1",
                        "AES-192-CFB8",
                        "AES-192-OFB",
                        "AES-256-CBC",
                        "AES-256-CFB",
                        "AES-256-CFB1",
                        "AES-256-CFB8",
                        "AES-256-OFB",
                        "BF-CBC",
                        "BF-CFB",
                        "BF-OFB",
                        "CAMELLIA-128-CBC",
                        "CAMELLIA-128-CFB1",
                        "CAMELLIA-128-CFB8",
                        "CAMELLIA-128-OFB",
                        "CAMELLIA-192-CBC",
                        "CAMELLIA-192-CFB",
                        "CAMELLIA-192-CFB1",
                        "CAMELLIA-192-CFB8",
                        "CAMELLIA-192-OFB",<commit_msg>[openvpn] Add missing TLS ciphers #172<commit_after>"""
OpenVpn 2.3 specific JSON-Schema definition
"""
from copy import deepcopy

from ...schema import schema as default_schema

base_openvpn_schema = {
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "additionalProperties": True,
    "definitions": {
        "tunnel": {
            "type": "object",
            "required": ["name", "mode", "proto", "dev"],
            "properties": {
                "name": {
                    "title": "name",
                    "description": "descriptive name for internal use, (only alphanumeric "
                    "characters, dashes and underscores allowed)",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 24,
                    "pattern": "^[0-9A-Za-z_-]*$",
                    "propertyOrder": 0,
                },
                "mode": {"title": "mode", "type": "string", "propertyOrder": 2},
                "proto": {"title": "protocol", "type": "string", "propertyOrder": 3},
                "port": {
                    "title": "port",
                    "type": "integer",
                    "default": 1194,
                    "maximum": 65535,
                    "minimum": 1,
                    "propertyOrder": 4,
                },
                "dev_type": {
                    "title": "device type",
                    "description": "tun (layer3) or tap (layer2)",
                    "type": "string",
                    "enum": ["tun", "tap"],
                    "propertyOrder": 5,
                },
                "dev": {
                    "title": "device name",
                    "description": "VPN interface name",
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 15,
                    "pattern": "^[^\\s]*$",
                    "propertyOrder": 6,
                },
                "local": {
                    "title": "local",
                    "type": "string",
                    "description": "Local hostname or IP address on which OpenVPN will listen to. "
                    "If unspecified, OpenVPN will bind to all interfaces.",
                    "propertyOrder": 8,
                },
                "comp_lzo": {
                    "title": "LZO compression",
                    "description": "Use fast LZO compression; may add up to 1 "
                    "byte per packet for incompressible data",
                    "type": "string",
                    "enum": ["yes", "no", "adaptive"],
                    "default": "adaptive",
                    "propertyOrder": 9,
                },
                "auth": {
                    "title": "auth digest algorithm",
                    "type": "string",
                    "enum": [
                        "DSA",
                        "DSA-SHA",
                        "DSA-SHA1",
                        "DSA-SHA1-old",
                        "MD4",
                        "MD5",
                        "MDC2",
                        "RIPEMD160",
                        "RSA-MD4",
                        "RSA-MD5",
                        "RSA-MDC2",
                        "RSA-RIPEMD160",
                        "RSA-SHA",
                        "RSA-SHA1",
                        "RSA-SHA1-2",
                        "RSA-SHA224",
                        "RSA-SHA256",
                        "RSA-SHA384",
                        "RSA-SHA512",
                        "SHA",
                        "SHA1",
                        "SHA224",
                        "SHA256",
                        "SHA384",
                        "SHA512",
                        "ecdsa-with-SHA1",
                        "whirlpool",
                        "none",
                    ],
                    "default": "SHA1",
                    "propertyOrder": 11,
                },
                "cipher": {
                    "title": "cipher",
                    "type": "string",
                    "description": "Encrypt data channel packets with cipher algorithm",
                    "enum": [
                        "AES-128-CBC",
                        "AES-128-CFB",
                        "AES-128-CFB1",
                        "AES-128-CFB8",
                        "AES-128-GCM",
                        "AES-128-OFB",
                        "AES-192-CBC",
                        "AES-192-CFB",
                        "AES-192-CFB1",
                        "AES-192-CFB8",
                        "AES-192-GCM",
                        "AES-192-OFB",
                        "AES-256-CBC",
                        "AES-256-CFB",
                        "AES-256-CFB1",
                        "AES-256-CFB8",
                        "AES-256-GCM",
                        "AES-256-OFB",
                        "BF-CBC",
                        "BF-CFB",
                        "BF-OFB",
                        "CAMELLIA-128-CBC",
                        "CAMELLIA-128-CFB1",
                        "CAMELLIA-128-CFB8",
                        "CAMELLIA-128-OFB",
                        "CAMELLIA-192-CBC",
                        "CAMELLIA-192-CFB",
                        "CAMELLIA-192-CFB1",
                        "CAMELLIA-192-CFB8",
                        "CAMELLIA-192-OFB",
{'fraction_non_alphanumeric': 0.1288756070227867, 'fraction_numerical': 0.03119163242435562, 'mean_word_length': 0.7662873165099786, 'pattern_counts': {'":': 136, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5615890', 'n_tokens_mistral': 3088, 'n_tokens_neox': 2529, 'n_words': 525}