Repository navigation
Commit e43f883
Validate context and role before Apple PNSE in RequestClientCertificateBufferedCore
RequestClientCertificateBufferedCore dereferenced _context via _context!.IsServer
without first ensuring a context was set, risking a NullReferenceException when
callers invoke post-handshake client authentication before SetContext. It also
performed the server-only role check only inside the non-Apple branch, so on Apple
platforms client-session misuse threw PlatformNotSupportedException instead of the
documented InvalidOperationException.
Add ThrowIfContextNotSet() so the missing-context case surfaces the documented
InvalidOperationException, and hoist the server-only role guard ahead of the
TARGET_APPLE PlatformNotSupportedException so role misuse validates consistently
across all platforms.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 89084543-7d70-4562-8776-d4ca1baa3c7c1 parent 138a5a5 commit e43f883
1 file changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
| 1442 | + | |
1442 | 1443 | | |
1443 | 1444 | | |
1444 | 1445 | | |
1445 | 1446 | | |
1446 | 1447 | | |
1447 | 1448 | | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
1451 | | - | |
1452 | | - | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1453 | 1452 | | |
1454 | 1453 | | |
1455 | 1454 | | |
1456 | 1455 | | |
1457 | 1456 | | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1458 | 1462 | | |
1459 | 1463 | | |
1460 | 1464 | | |
| |||
0 commit comments