[GH-ISSUE #896] [BUG] Crash app when parsing a invalid p12 file #890

Open
opened 2026-03-03 19:22:45 +03:00 by kerem · 1 comment
Owner

Originally created by @NghiaTranUIT on GitHub (May 22, 2021).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/896

Originally assigned to: @NghiaTranUIT on GitHub.

Description

For some reason, if the user imports a custom p12 file, which is invalid, SwiftNIO-SSL might crash the app if it could not parse the p12 file properly.

It's crashed due to the fatalError()

github.com/apple/swift-nio-ssl@9c457d021e/Sources/NIOSSL/SSLPKCS12Bundle.swift (L65)

We should throw the exception instead of crashing the app.

Originally created by @NghiaTranUIT on GitHub (May 22, 2021). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/896 Originally assigned to: @NghiaTranUIT on GitHub. ### Description For some reason, if the user imports a custom p12 file, which is invalid, SwiftNIO-SSL might crash the app if it could not parse the p12 file properly. It's crashed due to the fatalError() https://github.com/apple/swift-nio-ssl/blob/9c457d021e8be61d02941dafc2f34da80f328d2e/Sources/NIOSSL/SSLPKCS12Bundle.swift#L65 We should throw the exception instead of crashing the app.
Author
Owner

@NghiaTranUIT commented on GitHub (May 22, 2021):

Done 👍

<!-- gh-comment-id:846414359 --> @NghiaTranUIT commented on GitHub (May 22, 2021): Done 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#890
No description provided.