aboutsummaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-01-21 12:27:42 +0000
committerOmar Polo <op@omarpolo.com>2024-01-21 12:27:42 +0000
commitaa2cb5c274a14b6623c30cbf380000afcb04ff1a (patch)
treebe2a33390a7464662ecc4afc6806fec68ceafbf8 /crypto.c
parent63e6b0bd0ced8b14ffb84efb31cf66346a4d68d3 (diff)
rename ibuf to imsgbuf in crypto
soon we'll be using a struct ibuf and it'll be confusing.
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/crypto.c b/crypto.c
index cff2722..02a6b6b 100644
--- a/crypto.c
+++ b/crypto.c
@@ -251,7 +251,7 @@ rsae_send_imsg(int flen, const unsigned char *from, unsigned char *to,
struct imsgev *iev;
struct privsep_proc *p;
struct privsep *ps = conf->ps;
- struct imsgbuf *ibuf;
+ struct imsgbuf *imsgbuf;
struct imsg imsg;
int ret = 0;
int n, done = 0;
@@ -289,16 +289,16 @@ rsae_send_imsg(int flen, const unsigned char *from, unsigned char *to,
iev = ps->ps_ievs[PROC_CRYPTO];
p = iev->proc;
- ibuf = &iev->ibuf;
+ imsgbuf = &iev->ibuf;
while (!done) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
+ if ((n = imsg_read(imsgbuf)) == -1 && errno != EAGAIN)
fatalx("imsg_read");
if (n == 0)
fatalx("pipe closed");
while (!done) {
- if ((n = imsg_get(ibuf, &imsg)) == -1)
+ if ((n = imsg_get(imsgbuf, &imsg)) == -1)
fatalx("imsg_get error");
if (n == 0)
break;
@@ -310,7 +310,7 @@ rsae_send_imsg(int flen, const unsigned char *from, unsigned char *to,
imsg.hdr.peerid, "crypto", imsg.hdr.pid);
#endif
- if ((p->p_cb)(ibuf->fd, p, &imsg) == 0) {
+ if ((p->p_cb)(imsgbuf->fd, p, &imsg) == 0) {
/* Message was handled by the callback */
imsg_free(&imsg);
continue;
@@ -399,7 +399,7 @@ ecdsae_send_enc_imsg(const unsigned char *dgst, int dgst_len,
struct imsgev *iev;
struct privsep_proc *p;
struct privsep *ps = conf->ps;
- struct imsgbuf *ibuf;
+ struct imsgbuf *imsgbuf;
struct imsg imsg;
int n, done = 0;
const void *toptr;
@@ -434,16 +434,16 @@ ecdsae_send_enc_imsg(const unsigned char *dgst, int dgst_len,
iev = ps->ps_ievs[PROC_CRYPTO];
p = iev->proc;
- ibuf = &iev->ibuf;
+ imsgbuf = &iev->ibuf;
while (!done) {
- if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
+ if ((n = imsg_read(imsgbuf)) == -1 && errno != EAGAIN)
fatalx("imsg_read");
if (n == 0)
fatalx("pipe closed");
while (!done) {
- if ((n = imsg_get(ibuf, &imsg)) == -1)
+ if ((n = imsg_get(imsgbuf, &imsg)) == -1)
fatalx("imsg_get error");
if (n == 0)
break;
@@ -456,7 +456,8 @@ ecdsae_send_enc_imsg(const unsigned char *dgst, int dgst_len,
#endif
if (imsg.hdr.type != IMSG_CRYPTO_ECDSA_SIGN &&
- crypto_dispatch_server(ibuf->fd, p, &imsg) == 0) {
+ crypto_dispatch_server(imsgbuf->fd, p, &imsg)
+ == 0) {
/* Message was handled by the callback */
imsg_free(&imsg);
continue;