Displaying 20 results from an estimated 26 matches for "sshbuf_free".
2024 Aug 13
2
[PATCH] Fix typos in sshbuf.c
...till-existant
the -> then
Okay?
Index: sshbuf.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sshbuf.c,v
diff -u -p -u -p -r1.19 sshbuf.c
--- sshbuf.c 2 Dec 2022 04:40:27 -0000 1.19
+++ sshbuf.c 13 Aug 2024 16:39:12 -0000
@@ -168,8 +168,8 @@ sshbuf_free(struct sshbuf *buf)
return;
/*
- * If we are a parent with still-extant children, then don't free just
- * yet. The last child's call to sshbuf_free should decrement our
+ * If we are a parent with still-existant children, then don't free
+ * just yet. The last child's cal...
2025 Feb 13
4
[PATCH 0/4] [PATCH] Immediately report interactive instructions
From: "Marco Trevisan" <marco at ubuntu.com>
This serie of patches have been already submitted via [1], but i'm
sending them again to the ML, to see if they can get some more traction.
The patches are already part of Ubuntu openssh since 24.04, and they
basically allow proper immediate instruction reporting to clients using
PAM (as per RFC4256).
This follows the approach
2025 Feb 13
0
[PATCH 2/4] auth-pam: Add an enum to define the PAM done status
...int pam_done;
+ SshPamDone pam_done;
};
static void sshpam_free_ctx(void *);
@@ -904,7 +909,7 @@ sshpam_query(void *ctx, char **name, char **info,
**prompts = NULL;
*num = 0;
**echo_on = 0;
- ctxt->pam_done = -1;
+ ctxt->pam_done = SshPamError;
free(msg);
sshbuf_free(buffer);
return 0;
@@ -931,7 +936,7 @@ sshpam_query(void *ctx, char **name, char **info,
import_environments(buffer);
*num = 0;
**echo_on = 0;
- ctxt->pam_done = 1;
+ ctxt->pam_done = SshPamAuthenticated;
free(msg);
sshbuf_free(buffer);
return (0);
@@...
2015 Jun 23
2
Call for testing: OpenSSH 6.9
...expected[i].l.key,
NULL), 0);
diff --git a/regress/unittests/kex/test_kex.c b/regress/unittests/kex/test_kex.c
index c61e2bd..cf35f09 100644
--- a/regress/unittests/kex/test_kex.c
+++ b/regress/unittests/kex/test_kex.c
@@ -141,13 +141,16 @@ do_kex_with_key(char *kex, int keytype, int bits)
sshbuf_free(state);
ASSERT_PTR_NE(server2->kex, NULL);
/* XXX we need to set the callbacks */
+#ifdef WITH_OPENSSL
server2->kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
server2->kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server;
server2->kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
server...
2024 Aug 13
0
[PATCH] Simplify code with freezero
...cit_bzero
followed by free.
Okay?
Index: sshbuf.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/sshbuf.c,v
diff -u -p -u -p -r1.19 sshbuf.c
--- sshbuf.c 2 Dec 2022 04:40:27 -0000 1.19
+++ sshbuf.c 13 Aug 2024 16:54:20 -0000
@@ -183,10 +183,8 @@ sshbuf_free(struct sshbuf *buf)
sshbuf_free(buf->parent);
buf->parent = NULL;
- if (!buf->readonly) {
- explicit_bzero(buf->d, buf->alloc);
- free(buf->d);
- }
+ if (!buf->readonly)
+ freezero(buf->d, buf->alloc);
freezero(buf, sizeof(*buf));
}
2025 Feb 13
0
[PATCH 1/4] auth: Add KbdintResult definition to define result values explicitly
...um);
- return (-1);
+ return KbdintResultFailure;
}
if ((buffer = sshbuf_new()) == NULL)
fatal("%s: sshbuf_new failed", __func__);
@@ -1015,10 +1015,10 @@ sshpam_respond(void *ctx, u_int num, char **resp)
}
if (ssh_msg_send(ctxt->pam_psock, PAM_AUTHTOK, buffer) == -1) {
sshbuf_free(buffer);
- return (-1);
+ return KbdintResultFailure;
}
sshbuf_free(buffer);
- return (1);
+ return KbdintResultAgain;
}
static void
diff --git a/auth.h b/auth.h
index 98bb23d4c..aba6e775d 100644
--- a/auth.h
+++ b/auth.h
@@ -51,6 +51,7 @@ struct sshauthopt;
typedef struct Authctxt Authc...
2018 Dec 28
19
[Bug 2948] New: implement "copy-data" sftp extension
https://bugzilla.mindrot.org/show_bug.cgi?id=2948
Bug ID: 2948
Summary: implement "copy-data" sftp extension
Product: Portable OpenSSH
Version: -current
Hardware: All
URL: https://tools.ietf.org/html/draft-ietf-secsh-filexfer-
extensions-00#section-7
OS: All
Status: NEW
2020 Jun 09
3
[PATCH v2 0/2] Add openssl engine keys with provider upgrade path
I've architected this in a way that looks future proof at least to the
openssl provider transition. What will happen in openssl 3.0.0 is
that providers become active and will accept keys via URI. The
current file mechanisms will still be available but internally it will
become a file URI. To support the provider interface, openssl will
have to accept keys by URI instead of file and may
2019 Aug 06
2
[PATCH v2] Remove sshkey_load_private()
...out;
- }
- if ((r = sshkey_load_file(fd, buffer)) != 0 ||
- (r = sshkey_parse_private_fileblob(buffer, passphrase, keyp,
- commentp)) != 0)
- goto out;
- if (keyp && *keyp &&
- (r = sshkey_set_filename(*keyp, filename)) != 0)
- goto out;
- r = 0;
- out:
- close(fd);
- sshbuf_free(buffer);
- return r;
-}
-
static int
sshkey_try_load_public(struct sshkey *k, const char *filename, char **commentp)
{
diff --git a/authfile.h b/authfile.h
index a6b9759c5ea..0279a89e2b4 100644
--- a/authfile.h
+++ b/authfile.h
@@ -38,7 +38,6 @@ int sshkey_save_private(struct sshkey *, const cha...
2018 Dec 10
2
[PATCH] cleanup of global variables server/client_version_string in sshconnect.c
In sshconnect.c there are two global variables for server_version_string
client_version_string.
These are used just in a few functions and can easily be passed as
parameters.
Also, there is a strange construct, where their memory is allocated to
the global pointers, then copies of these pointers are assigned to the
kex structure. The kex_free finally frees them via cleanup of the kex
2015 May 29
16
Call for testing: OpenSSH 6.9
Hi,
OpenSSH 6.9 is almost ready for release, so we would appreciate testing
on as many platforms and systems as possible. This release contains
some substantial new features and a number of bugfixes.
Snapshot releases for portable OpenSSH are available from
http://www.mindrot.org/openssh_snap/
The OpenBSD version is available in CVS HEAD:
http://www.openbsd.org/anoncvs.html
Portable OpenSSH is
2024 Dec 21
2
[PATCH 0/2] Fix Memory Management Issue in `ssh-sk-helper` with External SK Libraries
Hi,
Sometimes, users might find that the `ssh-sk-helper` crashes after
enrolling a new key when using external SK libraries.
Currently, the memory returned by SK APIs is freed by the host, but
external libraries may have their own methods of handling memory. For
instance some external libraries are linked against a foreign libc
statically. As a result, the `ssh-sk-helper` would have issues if
2018 Sep 06
4
Some wishes regarding revoked keys
Hello.
I am trying to play through the following test scenario about
certificate revocation on Ubuntu 18.04, which has OpenSSH of this version:
OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n? 7 Dec 2017
1. A CA key is created
ssh-keygen -t ed25519 -f ca
2. The CA public key is added to ~/.ssh/authorized_keys on some server:
cert-authority ssh-ed25519 AAAA...e ca at yoga
3. A user key is created on a
2020 Jan 30
6
[PATCH 1/2] Add support for openssl engine based keys
...pin);
+ if (r)
+ goto out;
+ if (constrained) {
+ r = encode_constraints(msg, lifetime, confirm, maxsign, NULL);
+ if (r)
+ goto out;
+ }
+ r = ssh_request_reply(sock, msg, msg);
+ if (r)
+ goto out;
+ r = sshbuf_get_u8(msg, &type);
+ if (r)
+ goto out;
+ r = (signed char)type;
+ out:
+ sshbuf_free(msg);
+ return r;
+}
+
+
/*
* Add/remove an token-based identity from the authentication server.
* This call is intended only for use by ssh-add(1) and like applications.
diff --git a/authfd.h b/authfd.h
index c3bf6259a..1dd1070cb 100644
--- a/authfd.h
+++ b/authfd.h
@@ -38,6 +38,9 @@ int ssh_...
2019 Sep 10
3
[Bug 3068] New: Duplicate code in sshkey_load_private() function
https://bugzilla.mindrot.org/show_bug.cgi?id=3068
Bug ID: 3068
Summary: Duplicate code in sshkey_load_private() function
Product: Portable OpenSSH
Version: 8.0p1
Hardware: Other
OS: Windows 10
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh-keygen
Assignee:
2020 May 19
3
[Bug 3167] New: Bugs found by static tests
https://bugzilla.mindrot.org/show_bug.cgi?id=3167
Bug ID: 3167
Summary: Bugs found by static tests
Product: Portable OpenSSH
Version: 8.2p1
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5
Component: sshd
Assignee: unassigned-bugs at mindrot.org
2017 Oct 26
3
[RFC 0/2] add engine based keys
Engine keys are private key files which are only understood by openssl
external engines. ?The problem is they can't be loaded with the usual
openssl methods, they have to be loaded via ENGINE_load_private_key().
?Because they're files, they fit well into openssh pub/private file
structure, so they're not very appropriately handled by the pkcs11
interface because it assumes the private
2025 Apr 29
1
Multiple allowed signer files in `ssh-keygen -Y verify`
...else {
- fprintf(stderr, "No principal matched.\n");
+ xextendf(&output, "\n", "%s", cp);
+ free(principals);
}
+ if (output != NULL) {
+ printf("%s\n", output);
+ ret = 0;
+ } else
+ fprintf(stderr, "No principal matched.\n");
+done:
sshbuf_free(sigbuf);
sshbuf_free(abuf);
sshkey_free(sign_key);
- free(principals);
+ free(output);
return ret;
}
static int
-sig_match_principals(const char *allowed_keys, char *principal,
- char * const *opts, size_t nopts)
+sig_match_principals(char **allowed_keys, size_t nallowed_keys,
+ char *...
2025 Apr 23
1
Multiple allowed signer files in `ssh-keygen -Y verify`
Hello,
I'm currently evaluating using `ssh-keygen -Y verify` to check OS
artifacts (e.g. packages) and I noticed that the `-f
allowed_signers_file` option can be passed only once. A side remark:
technically it can be passed multiple times without a warning but the
last invocation overrides all previous ones. Tested using:
$ ssh-keygen -Y verify -f allowed_signers -f /dev/null -n file -s
2020 Mar 24
4
ZSTD compression support for OpenSSH
I hacked zstd support into OpenSSH a while ago and just started to clean
it up in the recent days. The cleanup includes configuration support
among other things that I did not have.
During testing I noticed the following differences compared to zlib:
- highly interactive shell output (as in refreshed at a _very_ high
rate) may result in higher bandwidth compared to zlib. Since zstd is
quicker