Lines Matching refs:m_cipher
80 def translate_gnutls(m_cipher): argument
86 m_cipher = re.sub(r'\ATLS-', '+', m_cipher)
87 m_cipher = m_cipher.replace("-WITH-", ":+")
88 m_cipher = m_cipher.replace("-EDE", "")
92 if m_cipher[-3:] == "SHA":
93 m_cipher = m_cipher+"1"
97 if "CCM" in m_cipher or "GCM" in m_cipher:
98 m_cipher = re.sub(r"GCM-SHA\d\d\d", "GCM", m_cipher)
99 m_cipher = m_cipher+":+AEAD"
103 index = m_cipher.rindex("-")
104 m_cipher = m_cipher[:index] + ":+" + m_cipher[index+1:]
106 return m_cipher
108 def translate_ossl(m_cipher): argument
114 m_cipher = re.sub(r'^TLS-', '', m_cipher)
115 m_cipher = m_cipher.replace("-WITH", "")
118 m_cipher = m_cipher.replace("AES-", "AES")
119 m_cipher = m_cipher.replace("CAMELLIA-", "CAMELLIA")
120 m_cipher = m_cipher.replace("ARIA-", "ARIA")
123 m_cipher = re.sub(r'^RSA-', r'', m_cipher)
126 if "PSK" not in m_cipher:
127 m_cipher = m_cipher.replace("-EDE", "")
128 m_cipher = m_cipher.replace("3DES-CBC", "DES-CBC3")
131 m_cipher = re.sub(r'(?<!DES-)CBC-', r'', m_cipher)
134 m_cipher = m_cipher.replace("ECDHE-RSA-ARIA", "ECDHE-ARIA")
137 if "POLY1305" in m_cipher:
138 index = m_cipher.rindex("POLY1305")
139 m_cipher = m_cipher[:index+8]
142 if "DES" in m_cipher and "DHE" in m_cipher and "ECDHE" not in m_cipher:
143 m_cipher = m_cipher.replace("DHE", "EDH")
145 return m_cipher