- Notifications
You must be signed in to change notification settings - Fork28
Commit79dfa8a
committed
Add bound checks for ssl_min_protocol_version and ssl_max_protocol_version
Mixing incorrect bounds in the SSL context leads to confusing errormessages generated by OpenSSL which are hard to act on. New rangechecks are added when both min/max parameters are loaded in the contextof a SSL reload to improve the error reporting. Note that this does notmake use of the GUC hook machinery contrary to41aadee, as there is noway to ensure a consistent range check (except if there is a way one dayto define range types for GUC parameters?). Hence, this patch appliesonly to OpenSSL, and uses a logic similar to other parameters to triggeran error when reloading the SSL context in a session.Author: Michael PaquierReviewed-by: Daniel GustafssonDiscussion:https://postgr.es/m/20200114035420.GE1515@paquier.xyz1 parentde93963 commit79dfa8a
File tree
2 files changed
+62
-21
lines changed- src
- backend/libpq
- test/ssl/t
2 files changed
+62
-21
lines changedLines changed: 45 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 |
| - | |
72 |
| - | |
| 71 | + | |
73 | 72 |
| |
74 | 73 |
| |
75 | 74 |
| |
| |||
80 | 79 |
| |
81 | 80 |
| |
82 | 81 |
| |
| 82 | + | |
| 83 | + | |
83 | 84 |
| |
84 | 85 |
| |
85 | 86 |
| |
| |||
188 | 189 |
| |
189 | 190 |
| |
190 | 191 |
| |
191 |
| - | |
192 |
| - | |
193 |
| - | |
| 192 | + | |
194 | 193 |
| |
195 |
| - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
196 | 201 |
| |
197 |
| - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
198 | 205 |
| |
199 | 206 |
| |
200 | 207 |
| |
| |||
204 | 211 |
| |
205 | 212 |
| |
206 | 213 |
| |
207 |
| - | |
208 |
| - | |
209 |
| - | |
| 214 | + | |
210 | 215 |
| |
211 |
| - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
212 | 223 |
| |
213 |
| - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
214 | 227 |
| |
215 | 228 |
| |
216 | 229 |
| |
217 | 230 |
| |
218 | 231 |
| |
219 | 232 |
| |
220 | 233 |
| |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
221 | 251 |
| |
222 | 252 |
| |
223 | 253 |
| |
| |||
1271 | 1301 |
| |
1272 | 1302 |
| |
1273 | 1303 |
| |
1274 |
| - | |
1275 |
| - | |
1276 |
| - | |
| 1304 | + | |
| 1305 | + | |
1277 | 1306 |
| |
1278 | 1307 |
| |
1279 | 1308 |
| |
1280 | 1309 |
| |
1281 | 1310 |
| |
1282 |
| - | |
| 1311 | + | |
1283 | 1312 |
| |
1284 | 1313 |
| |
1285 | 1314 |
| |
| |||
1307 | 1336 |
| |
1308 | 1337 |
| |
1309 | 1338 |
| |
1310 |
| - | |
1311 |
| - | |
1312 |
| - | |
1313 |
| - | |
1314 | 1339 |
| |
1315 | 1340 |
|
Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
100 | 116 |
| |
101 | 117 |
| |
102 | 118 |
| |
|
0 commit comments
Comments
(0)