Repository navigation
Commit ecbb576
committed
Restore CTX version settings after any failed setter
wolfSSL_CTX_set_max_proto_version() clears the NO_TLSv1* options and
re-applies the minimum before Set_CTX_max_proto_version() can fail, and
wolfSSL_CTX_set_min_proto_version() clears them when the maximum is
below the requested minimum. CtxVersionRestore() undid this only for
DTLS and for methods that cannot downgrade, so on a wolfSSLv23_*() CTX
a failed call, such as a DTLS, unknown or unsupported SSLv3 version,
left the user's version options cleared, or every version masked off.
This predates the restore code.
Restore the mask, minimum and method version on every failure. A
failed maximum now leaves the earlier version range in place instead
of disabling the CTX, as OpenSSL does.
test_tls_ctx_proto_failed_keeps_options covers each failing maximum and
an unknown minimum on a v23 CTX capped at TLS 1.2, in any build with
OPENSSL_EXTRA and TLS 1.2.1 parent 326779e commit ecbb576
2 files changed
Lines changed: 48 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5245 | 5245 | | |
5246 | 5246 | | |
5247 | 5247 | | |
5248 | | - | |
5249 | | - | |
| 5248 | + | |
5250 | 5249 | | |
5251 | 5250 | | |
5252 | 5251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3102 | 3102 | | |
3103 | 3103 | | |
3104 | 3104 | | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
3105 | 3149 | | |
3106 | 3150 | | |
3107 | 3151 | | |
| |||
3118 | 3162 | | |
3119 | 3163 | | |
3120 | 3164 | | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
3121 | 3168 | | |
3122 | 3169 | | |
3123 | 3170 | | |
| |||
0 commit comments