diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2019-03-17 11:28:18 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2019-03-17 11:28:18 +0000 |
commit | a27ed4e6a9eb6b839eb3da2e033a395f002540ad (patch) | |
tree | 0647f1f6552040995c1df4367244581c78791dd2 /net-mgmt/send/files/patch-libs-libcga-cga_mt.c | |
parent | Update to 6.0.3 (diff) |
Fix build with OpenSSL 1.1.x.
Diffstat (limited to 'net-mgmt/send/files/patch-libs-libcga-cga_mt.c')
-rw-r--r-- | net-mgmt/send/files/patch-libs-libcga-cga_mt.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/net-mgmt/send/files/patch-libs-libcga-cga_mt.c b/net-mgmt/send/files/patch-libs-libcga-cga_mt.c new file mode 100644 index 000000000000..a70b51c861e4 --- /dev/null +++ b/net-mgmt/send/files/patch-libs-libcga-cga_mt.c @@ -0,0 +1,54 @@ +--- libs/libcga/cga_mt.c.orig 2019-02-27 16:25:45 UTC ++++ libs/libcga/cga_mt.c +@@ -77,10 +77,10 @@ SPIN(void) + static int + add_mod(uint8_t *m, uint32_t s) + { +- BIGNUM bn[1], *bnp; ++ BIGNUM *bn, *bnp; + int blen; + +- BN_init(bn); ++ bn = BN_new(); + if ((bnp = BN_bin2bn(m, CGA_MODLEN, bn)) == NULL) { + ssl_err(__FUNCTION__, "BN_bin2bin failed"); + return (-1); +@@ -88,6 +88,7 @@ add_mod(uint8_t *m, uint32_t s) + BN_add_word(bnp, s); + blen = BN_num_bytes(bnp); + BN_bn2bin(bnp, m + (CGA_MODLEN - blen)); ++ BN_free(bn); + + return (0); + } +@@ -177,12 +178,16 @@ done: + static void + opssec(struct timeval *start, uint8_t *startmod) + { +- BIGNUM sm[1], em[1], ops[1], t[1], dv[1]; ++ BIGNUM *sm, *em, *ops, *t, *dv; + BN_CTX *bc; + struct timeval tv[1]; + char *dec; + +- BN_init(sm); BN_init(em); BN_init(ops); BN_init(t); BN_init(dv); ++ sm = BN_new(); ++ em = BN_new(); ++ ops = BN_new(); ++ t = BN_new(); ++ dv = BN_new(); + BN_bin2bn(startmod, CGA_MODLEN, sm); + BN_bin2bn(state->mod, CGA_MODLEN, em); + BN_sub(ops, em, sm); +@@ -210,6 +215,11 @@ opssec(struct timeval *start, uint8_t *startmod) + + OPENSSL_free(dec); + BN_CTX_free(bc); ++ BN_free(sm); ++ BN_free(em); ++ BN_free(ops); ++ BN_free(t); ++ BN_free(dv); + } + + void |