authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 23:45:23 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 23:45:23 -07:00
logd724f3d9c76bff2e6454d2601c7a22fe5134ae8e
treef7f14299fcce890b17a7c052a5ca88aa72bf8e02
parent5bcf64a7040873df380d316117420e1c432fab90
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

some pgp signatures don't have the trailing newline


1 files changed, 2 insertions(+), 2 deletions(-)

git.zig+2-2
...@@ -2177,8 +2177,8 @@ pub const Signature = union(enum) {...@@ -2177,8 +2177,8 @@ pub const Signature = union(enum) {
2177 if (pem_sig.len == 0) {2177 if (pem_sig.len == 0) {
2178 return .none;2178 return .none;
2179 }2179 }
2180 if (std.mem.startsWith(u8, pem_sig, "-----BEGIN PGP SIGNATURE-----\n \n ") and std.mem.endsWith(u8, pem_sig, "\n -----END PGP SIGNATURE-----\n ")) {2180 if (std.mem.startsWith(u8, pem_sig, "-----BEGIN PGP SIGNATURE-----\n \n ") and (std.mem.endsWith(u8, pem_sig, "\n -----END PGP SIGNATURE-----\n ") or std.mem.endsWith(u8, pem_sig, "\n -----END PGP SIGNATURE-----"))) {
2181 const pembody = pem_sig[33 .. std.mem.indexOf(u8, pem_sig, "\n =") orelse pem_sig.len - 31];2181 const pembody = pem_sig[33 .. std.mem.indexOf(u8, pem_sig, "\n =") orelse std.mem.indexOf(u8, pem_sig, "\n -----END").?];
2182 const sigcontent = pembody[0..std.mem.lastIndexOf(u8, pembody, "\n ").?];2182 const sigcontent = pembody[0..std.mem.lastIndexOf(u8, pembody, "\n ").?];
2183 var fixed: nio.FixedBufferStream([]const u8) = .init(sigcontent);2183 var fixed: nio.FixedBufferStream([]const u8) = .init(sigcontent);
2184 var skip = nio.SkipReader(void).from(&fixed, "\n ");2184 var skip = nio.SkipReader(void).from(&fixed, "\n ");