aboutsummaryrefslogtreecommitdiff
path: root/ssh-agent-filter.C
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2021-04-22 23:29:10 +0200
committerTimo Weingärtner <timo@tiwe.de>2026-03-07 22:25:16 +0100
commitb929b048a1839c3da1cadf7f116b0f767f40267e (patch)
tree2ccd826673e1113b4eade64b2e04b20722471e91 /ssh-agent-filter.C
parent9d25142d506d1559b134d465ff0434ffbde7dca8 (diff)
downloadssh-agent-filter-b929b048a1839c3da1cadf7f116b0f767f40267e.tar.gz
implement separate rfc4251::(string|mpint|name_list) types
Diffstat (limited to 'ssh-agent-filter.C')
-rw-r--r--ssh-agent-filter.C14
1 files changed, 7 insertions, 7 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C
index 639e55c..c658b62 100644
--- a/ssh-agent-filter.C
+++ b/ssh-agent-filter.C
@@ -347,14 +347,14 @@ std::optional<string> dissect_auth_data_ssh_cert (rfc4251::string const & data)
rfc4251::string nonce{datastream};
std::ostringstream key_to_be_signed{};
if (keytype_str == "ssh-rsa") {
- rfc4251::string e{datastream};
- rfc4251::string n{datastream};
+ rfc4251::mpint e{datastream};
+ rfc4251::mpint n{datastream};
key_to_be_signed << rfc4251::string{keytype_str} << e << n;
} else if (keytype_str == "ssh-dss") {
- rfc4251::string p{datastream};
- rfc4251::string q{datastream};
- rfc4251::string g{datastream};
- rfc4251::string y{datastream};
+ rfc4251::mpint p{datastream};
+ rfc4251::mpint q{datastream};
+ rfc4251::mpint g{datastream};
+ rfc4251::mpint y{datastream};
key_to_be_signed << rfc4251::string{keytype_str} << p << q << g << y;
} else if (keytype_str == "ecdsa-sha2-nistp256"
|| keytype_str == "ecdsa-sha2-nistp384"
@@ -474,7 +474,7 @@ string describe_sign_request (rfc4251::string const & data_to_be_signed) {
rfc4251::string handle_request (rfc4251::string const & r) {
io::stream<io::array_source> request{r.data(), r.size()};
rfc4251::string ret;
- io::stream<io::back_insert_device<vector<char>>> answer{ret.value};
+ io::stream<io::back_insert_device<vector<char>>> answer{ret.buf};
arm(request);
arm(answer);
rfc4251::byte request_code{request};