Lines Matching refs:s_cipher
79 def translate_gnutls(s_cipher): argument
87 s_cipher = s_cipher.replace("_", "-")
89 s_cipher = re.sub(r'\ATLS-', '+', s_cipher)
90 s_cipher = s_cipher.replace("-WITH-", ":+")
91 s_cipher = s_cipher.replace("-EDE", "")
95 if s_cipher[-3:] == "SHA":
96 s_cipher = s_cipher+"1"
100 if "CCM" in s_cipher or "GCM" in s_cipher:
101 s_cipher = re.sub(r"GCM-SHA\d\d\d", "GCM", s_cipher)
102 s_cipher = s_cipher+":+AEAD"
106 index = s_cipher.rindex("-")
107 s_cipher = s_cipher[:index] + ":+" + s_cipher[index+1:]
109 return s_cipher
111 def translate_ossl(s_cipher): argument
119 s_cipher = s_cipher.replace("_", "-")
121 s_cipher = re.sub(r'^TLS-', '', s_cipher)
122 s_cipher = s_cipher.replace("-WITH", "")
125 s_cipher = s_cipher.replace("AES-", "AES")
126 s_cipher = s_cipher.replace("CAMELLIA-", "CAMELLIA")
127 s_cipher = s_cipher.replace("ARIA-", "ARIA")
130 s_cipher = re.sub(r'^RSA-', r'', s_cipher)
133 if "PSK" not in s_cipher:
134 s_cipher = s_cipher.replace("-EDE", "")
135 s_cipher = s_cipher.replace("3DES-CBC", "DES-CBC3")
138 s_cipher = re.sub(r'(?<!DES-)CBC-', r'', s_cipher)
141 s_cipher = s_cipher.replace("ECDHE-RSA-ARIA", "ECDHE-ARIA")
144 if "POLY1305" in s_cipher:
145 index = s_cipher.rindex("POLY1305")
146 s_cipher = s_cipher[:index+8]
149 if "DES" in s_cipher and "DHE" in s_cipher and "ECDHE" not in s_cipher:
150 s_cipher = s_cipher.replace("DHE", "EDH")
152 return s_cipher
154 def translate_mbedtls(s_cipher): argument
161 s_cipher = s_cipher.replace("_", "-")
163 return s_cipher