mirror of
https://github.com/biergaizi/codecrypt
synced 2024-06-25 00:08:20 +00:00
actions: detachsign stdin/stdout support
This commit is contained in:
parent
e19ba185b7
commit
aa03f01530
@ -303,7 +303,8 @@ int action_sign (const std::string&user, bool armor, const std::string&detach,
|
||||
|
||||
std::ofstream detf;
|
||||
if (detach.length() ) {
|
||||
detf.open (detach.c_str(), std::ios::out | std::ios::binary);
|
||||
detf.open (detach == "-" ? "/dev/stdout" : detach.c_str(),
|
||||
std::ios::out | std::ios::binary);
|
||||
if (!detf) {
|
||||
err ("error: can't open detached signature file");
|
||||
return 1;
|
||||
@ -427,7 +428,8 @@ int action_verify (bool armor, const std::string&detach,
|
||||
|
||||
std::ifstream detf;
|
||||
if (detach.length() ) {
|
||||
detf.open (detach.c_str(), std::ios::in | std::ios::binary);
|
||||
detf.open (detach == "-" ? "/dev/stdin" : detach.c_str(),
|
||||
std::ios::in | std::ios::binary);
|
||||
if (!detf) {
|
||||
err ("error: can't open detached signature file");
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user