-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replaced panic calls with structured error handling in helper functions. * Used %w in fmt.Errorf for better error wrapping. * Better readability * Centralized redundant logic (e.g., PEM encoding/decoding and file writing) into toPEMBytes, decodePEMBlock, and writePEMToFile. * Ensured os.O_TRUNC is used to overwrite files securely in writePEMToFile. * Unified similar logic between public and private key handling.
- Loading branch information
1 parent
dcd44af
commit e173010
Showing
1 changed file
with
79 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters