| 1 |
#======================================================================= |
| 2 |
|
| 3 |
# Setup |
| 4 |
|
| 5 |
SELECT @@ssl_cipher INTO @saved_ssl_cipher; |
| 6 |
SELECT @@admin_ssl_cipher INTO @saved_admin_ssl_cipher; |
| 7 |
SELECT @@tls_ciphersuites INTO @saved_tls_ciphersuites; |
| 8 |
SELECT @@admin_tls_ciphersuites INTO @saved_admin_tls_ciphersuites; |
| 9 |
CREATE DATABASE cipher_db; |
| 10 |
CREATE TABLE cipher_db.ciphers_data(ciphers JSON); |
| 11 |
|
| 12 |
#======================================================================= |
| 13 |
|
| 14 |
# Valid cipher: Search should return empty |
| 15 |
INSERT INTO cipher_db.ciphers_data VALUES ('["ECDHE-RSA-AES128-GCM-SHA256"]'); |
| 16 |
|
| 17 |
#----------------------------------------------------------------------- |
| 18 |
|
| 19 |
# Setting server ciphers: ECDHE-RSA-AES128-GCM-SHA256 |
| 20 |
|
| 21 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-GCM-SHA256 |
| 22 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 23 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 24 |
|
| 25 |
|
| 26 |
#----------------------------------------------------------------------- |
| 27 |
|
| 28 |
# Valid ciphers: Search should return empty |
| 29 |
|
| 30 |
#----------------------------------------------------------------------- |
| 31 |
|
| 32 |
# Setting server ciphers: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384 |
| 33 |
|
| 34 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-GCM-SHA256 |
| 35 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 36 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 37 |
|
| 38 |
|
| 39 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES256-GCM-SHA384 |
| 40 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES256-GCM-SHA384' that is either blocked or deprecated" not found |
| 41 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES256-GCM-SHA384' that is either blocked or deprecated" not found |
| 42 |
|
| 43 |
|
| 44 |
#----------------------------------------------------------------------- |
| 45 |
|
| 46 |
# Deprecated cipher: Search should find warnings |
| 47 |
|
| 48 |
#----------------------------------------------------------------------- |
| 49 |
|
| 50 |
# Setting server ciphers: ECDHE-RSA-AES128-SHA256 |
| 51 |
|
| 52 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-SHA256 |
| 53 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 54 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 55 |
|
| 56 |
|
| 57 |
#----------------------------------------------------------------------- |
| 58 |
|
| 59 |
# Deprecated ciphers: Search should find warnings for each of them |
| 60 |
|
| 61 |
#----------------------------------------------------------------------- |
| 62 |
|
| 63 |
# Setting server ciphers: ECDHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256 |
| 64 |
|
| 65 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-SHA256 |
| 66 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 67 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 68 |
|
| 69 |
|
| 70 |
# Checking deprecation messages (if any) for DHE-RSA-AES256-SHA256 |
| 71 |
Pattern "Value for option 'ssl_cipher' contains cipher 'DHE-RSA-AES256-SHA256' that is either blocked or deprecated" found |
| 72 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'DHE-RSA-AES256-SHA256' that is either blocked or deprecated" found |
| 73 |
|
| 74 |
|
| 75 |
#----------------------------------------------------------------------- |
| 76 |
|
| 77 |
# Mix of valid and deprecated ciphers: Search should find warnings for two of them |
| 78 |
|
| 79 |
#----------------------------------------------------------------------- |
| 80 |
|
| 81 |
# Setting server ciphers: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256 |
| 82 |
|
| 83 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-GCM-SHA256 |
| 84 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 85 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 86 |
|
| 87 |
|
| 88 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-SHA256 |
| 89 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 90 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" found |
| 91 |
|
| 92 |
|
| 93 |
# Checking deprecation messages (if any) for DHE-RSA-AES256-SHA256 |
| 94 |
Pattern "Value for option 'ssl_cipher' contains cipher 'DHE-RSA-AES256-SHA256' that is either blocked or deprecated" found |
| 95 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'DHE-RSA-AES256-SHA256' that is either blocked or deprecated" found |
| 96 |
|
| 97 |
|
| 98 |
#----------------------------------------------------------------------- |
| 99 |
|
| 100 |
# Deprecated cipher with "!" prefix: Search should return empty |
| 101 |
|
| 102 |
#----------------------------------------------------------------------- |
| 103 |
|
| 104 |
# Setting server ciphers: !ECDHE-RSA-AES128-SHA256 |
| 105 |
|
| 106 |
# Checking deprecation messages (if any) for !ECDHE-RSA-AES128-SHA256 |
| 107 |
Pattern "Value for option 'ssl_cipher' contains cipher '!ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" not found |
| 108 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher '!ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" not found |
| 109 |
|
| 110 |
|
| 111 |
#----------------------------------------------------------------------- |
| 112 |
|
| 113 |
# Deprecated ciphers with "!" prefix: Search should return empty |
| 114 |
|
| 115 |
#----------------------------------------------------------------------- |
| 116 |
|
| 117 |
# Setting server ciphers: !ECDHE-RSA-AES128-GCM-SHA256:!ECDHE-RSA-AES256-GCM-SHA384 |
| 118 |
|
| 119 |
# Checking deprecation messages (if any) for !ECDHE-RSA-AES128-GCM-SHA256 |
| 120 |
Pattern "Value for option 'ssl_cipher' contains cipher '!ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 121 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher '!ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 122 |
|
| 123 |
|
| 124 |
# Checking deprecation messages (if any) for !ECDHE-RSA-AES256-GCM-SHA384 |
| 125 |
Pattern "Value for option 'ssl_cipher' contains cipher '!ECDHE-RSA-AES256-GCM-SHA384' that is either blocked or deprecated" not found |
| 126 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher '!ECDHE-RSA-AES256-GCM-SHA384' that is either blocked or deprecated" not found |
| 127 |
|
| 128 |
|
| 129 |
#----------------------------------------------------------------------- |
| 130 |
|
| 131 |
# Valid ciphers and deprecated ciphers with "!" prefix: Search should return empty |
| 132 |
|
| 133 |
#----------------------------------------------------------------------- |
| 134 |
|
| 135 |
# Setting server ciphers: ECDHE-RSA-AES128-GCM-SHA256:!ECDHE-RSA-AES128-SHA256:!DHE-RSA-AES256-SHA256 |
| 136 |
|
| 137 |
# Checking deprecation messages (if any) for ECDHE-RSA-AES128-GCM-SHA256 |
| 138 |
Pattern "Value for option 'ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 139 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher 'ECDHE-RSA-AES128-GCM-SHA256' that is either blocked or deprecated" not found |
| 140 |
|
| 141 |
|
| 142 |
# Checking deprecation messages (if any) for !ECDHE-RSA-AES128-SHA256 |
| 143 |
Pattern "Value for option 'ssl_cipher' contains cipher '!ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" not found |
| 144 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher '!ECDHE-RSA-AES128-SHA256' that is either blocked or deprecated" not found |
| 145 |
|
| 146 |
|
| 147 |
# Checking deprecation messages (if any) for !DHE-RSA-AES256-SHA256 |
| 148 |
Pattern "Value for option 'ssl_cipher' contains cipher '!DHE-RSA-AES256-SHA256' that is either blocked or deprecated" not found |
| 149 |
Pattern "Value for option 'admin_ssl_cipher' contains cipher '!DHE-RSA-AES256-SHA256' that is either blocked or deprecated" not found |
| 150 |
|
| 151 |
|
| 152 |
#----------------------------------------------------------------------- |
| 153 |
|
| 154 |
# Valid cipher: Search should return empty |
| 155 |
|
| 156 |
#----------------------------------------------------------------------- |
| 157 |
|
| 158 |
# Setting server ciphers: TLS_AES_128_GCM_SHA256 |
| 159 |
|
| 160 |
# Checking deprecation messages (if any) for TLS_AES_128_GCM_SHA256 |
| 161 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 162 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 163 |
|
| 164 |
|
| 165 |
#----------------------------------------------------------------------- |
| 166 |
|
| 167 |
# Valid ciphers: Search should return empty |
| 168 |
|
| 169 |
#----------------------------------------------------------------------- |
| 170 |
|
| 171 |
# Setting server ciphers: TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384 |
| 172 |
|
| 173 |
# Checking deprecation messages (if any) for TLS_AES_128_GCM_SHA256 |
| 174 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 175 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 176 |
|
| 177 |
|
| 178 |
# Checking deprecation messages (if any) for TLS_AES_256_GCM_SHA384 |
| 179 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_256_GCM_SHA384' that is either blocked or deprecated" not found |
| 180 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_256_GCM_SHA384' that is either blocked or deprecated" not found |
| 181 |
|
| 182 |
|
| 183 |
#----------------------------------------------------------------------- |
| 184 |
|
| 185 |
# Deprecated cipher: Search should find warnings |
| 186 |
|
| 187 |
#----------------------------------------------------------------------- |
| 188 |
|
| 189 |
# Setting server ciphers: TLS_AES_128_CCM_8_SHA256 |
| 190 |
|
| 191 |
# Checking deprecation messages (if any) for TLS_AES_128_CCM_8_SHA256 |
| 192 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 193 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 194 |
|
| 195 |
|
| 196 |
#----------------------------------------------------------------------- |
| 197 |
|
| 198 |
# Mix of valid and deprecated ciphers: Search should find warnings for one of them |
| 199 |
|
| 200 |
#----------------------------------------------------------------------- |
| 201 |
|
| 202 |
# Setting server ciphers: TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256 |
| 203 |
|
| 204 |
# Checking deprecation messages (if any) for TLS_AES_128_GCM_SHA256 |
| 205 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 206 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 207 |
|
| 208 |
|
| 209 |
# Checking deprecation messages (if any) for TLS_AES_128_CCM_8_SHA256 |
| 210 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 211 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 212 |
|
| 213 |
|
| 214 |
#----------------------------------------------------------------------- |
| 215 |
|
| 216 |
# Deprecated cipher with "!" prefix: Search should return empty |
| 217 |
|
| 218 |
#----------------------------------------------------------------------- |
| 219 |
|
| 220 |
# Setting server ciphers: !TLS_AES_128_CCM_8_SHA256 |
| 221 |
|
| 222 |
# Checking deprecation messages (if any) for !TLS_AES_128_CCM_8_SHA256 |
| 223 |
Pattern "Value for option 'tls_ciphersuites' contains cipher '!TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" not found |
| 224 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher '!TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" not found |
| 225 |
|
| 226 |
|
| 227 |
#----------------------------------------------------------------------- |
| 228 |
|
| 229 |
# Mix of valid and deprecated ciphers: Search should find warnings for one of them |
| 230 |
|
| 231 |
#----------------------------------------------------------------------- |
| 232 |
|
| 233 |
# Setting server ciphers: TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_CHACHA20_POLY1305_SHA256 |
| 234 |
|
| 235 |
# Checking deprecation messages (if any) for TLS_AES_128_GCM_SHA256 |
| 236 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 237 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 238 |
|
| 239 |
|
| 240 |
# Checking deprecation messages (if any) for TLS_AES_128_CCM_8_SHA256 |
| 241 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 242 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" found |
| 243 |
|
| 244 |
|
| 245 |
# Checking deprecation messages (if any) for TLS_CHACHA20_POLY1305_SHA256 |
| 246 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_CHACHA20_POLY1305_SHA256' that is either blocked or deprecated" not found |
| 247 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_CHACHA20_POLY1305_SHA256' that is either blocked or deprecated" not found |
| 248 |
|
| 249 |
|
| 250 |
#----------------------------------------------------------------------- |
| 251 |
|
| 252 |
# Valid ciphers and deprecated ciphers with "!" prefix: Search should return empty |
| 253 |
|
| 254 |
#----------------------------------------------------------------------- |
| 255 |
|
| 256 |
# Setting server ciphers: TLS_AES_128_GCM_SHA256:!TLS_AES_128_CCM_8_SHA256 |
| 257 |
|
| 258 |
# Checking deprecation messages (if any) for TLS_AES_128_GCM_SHA256 |
| 259 |
Pattern "Value for option 'tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 260 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher 'TLS_AES_128_GCM_SHA256' that is either blocked or deprecated" not found |
| 261 |
|
| 262 |
|
| 263 |
# Checking deprecation messages (if any) for !TLS_AES_128_CCM_8_SHA256 |
| 264 |
Pattern "Value for option 'tls_ciphersuites' contains cipher '!TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" not found |
| 265 |
Pattern "Value for option 'admin_tls_ciphersuites' contains cipher '!TLS_AES_128_CCM_8_SHA256' that is either blocked or deprecated" not found |
| 266 |
|
| 267 |
|
| 268 |
#----------------------------------------------------------------------- |
| 269 |
|
| 270 |
|
| 271 |
#======================================================================= |
| 272 |
|
| 273 |
# Cleanup |
| 274 |
|
| 275 |
|
| 276 |
#======================================================================= |