Skip to content

Commit

Permalink
Restore Old Behavior of Empty Passwords in .p12s
Browse files Browse the repository at this point in the history
This fixes a regression in ac9086a
  • Loading branch information
CRKatri committed Jan 18, 2023
1 parent ac9086a commit f64e8a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _ldid
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_arguments \
'-S-[Add signature]:entitlements:_files' \
'-w[Shallow sign]' \
'-w[Shallow sign]' \
'-Q-[Embed requirements]:requirements:_files' \
'(-S)-r[Remove signature]' \
'(-r)-h[Print signature information]' \
Expand Down
4 changes: 2 additions & 2 deletions ldid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@

bool flag_w(false);
bool flag_U(false);
std::string password;
std::string password = "";
std::vector<std::string> cleanup;
bool flag_H(false);

Expand Down Expand Up @@ -1826,7 +1826,7 @@ class Stuff {
exit(1);
}

if (!flag_U) {
if (PKCS12_verify_mac(value_, "", 0) == 0 && !flag_U) {
char passbuf[2048];
UI_UTIL_read_pw_string(passbuf, 2048, "Enter password: ", 0);
password = passbuf;
Expand Down

0 comments on commit f64e8a6

Please sign in to comment.