Commit f74ed821 authored by Ariadne Conill's avatar Ariadne Conill

testing/isoping: delete

parent e0cbce73
From bb1d0d7eb49078d1e27bbe28a6dd57eded3114fe Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Tue, 25 Feb 2020 21:03:37 +0000
Subject: [PATCH] isoping: support openssl 1.1
---
cmds/isoping.cc | 14 +++++++-------
cmds/isoping.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git cmds/isoping.cc cmds/isoping.cc
index 8cf6142..5e3958b 100644
--- cmds/isoping.cc
+++ cmds/isoping.cc
@@ -166,11 +166,11 @@ Sessions::Sessions()
cookie_epoch(0),
last_secret_update_time(0) {
NewRandomCookieSecret();
- EVP_MD_CTX_init(&digest_context);
+ digest_context = EVP_MD_CTX_new();
}
Sessions::~Sessions() {
- EVP_MD_CTX_cleanup(&digest_context);
+ EVP_MD_CTX_free(digest_context);
}
bool Sessions::CalculateCookie(Packet *p, struct sockaddr_storage *remoteaddr,
@@ -188,18 +188,18 @@ bool Sessions::CalculateCookieWithSecret(Packet *p,
fprintf(stderr, "Tried to create cookie for a non-handshake packet\n");
return false;
}
- if (!EVP_DigestInit_ex(&digest_context, md, NULL)) {
+ if (!EVP_DigestInit_ex(digest_context, md, NULL)) {
fprintf(stderr, "Unable to initialize hash digest\n");
return false;
}
// Hash the data
- EVP_DigestUpdate(&digest_context, secret, secret_len);
- EVP_DigestUpdate(&digest_context, &p->usec_per_pkt, sizeof(p->usec_per_pkt));
- EVP_DigestUpdate(&digest_context, remoteaddr, remoteaddr_len);
+ EVP_DigestUpdate(digest_context, secret, secret_len);
+ EVP_DigestUpdate(digest_context, &p->usec_per_pkt, sizeof(p->usec_per_pkt));
+ EVP_DigestUpdate(digest_context, remoteaddr, remoteaddr_len);
unsigned int digest_size = 0;
- EVP_DigestFinal_ex(&digest_context, p->data.handshake.cookie, &digest_size);
+ EVP_DigestFinal_ex(digest_context, p->data.handshake.cookie, &digest_size);
if (digest_size != COOKIE_SIZE) {
fprintf(stderr, "Invalid digest size %d for cookie; expected %d\n",
digest_size, COOKIE_SIZE);
diff --git cmds/isoping.h cmds/isoping.h
index 45c9bef..58723c7 100644
--- cmds/isoping.h
+++ cmds/isoping.h
@@ -176,7 +176,7 @@ class Sessions {
size_t secret_len);
// Fields required for calculating and verifying cookies.
- EVP_MD_CTX digest_context;
+ EVP_MD_CTX *digest_context;
const EVP_MD *md;
std::mt19937_64 rng;
uint32_t cookie_epoch;
--
2.25.1
# Contributor: Ariadne Conill <ariadne@dereferenced.org>
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname="isoping"
pkgver=20170626
pkgrel=0
pkgdesc="isochronous ping tool"
url="https://gfiber.googlesource.com/vendor/google/platform"
arch="all"
license="Apache-2.0"
makedepends="openssl-dev"
source="https://distfiles.dereferenced.org/stuff/isoping-$pkgver.tar.gz
0001-isoping-support-openssl-1.1.patch"
builddir="$srcdir/cmds"
options="!check"
build() {
make isoping
}
package() {
install -D -m755 isoping "$pkgdir"/usr/bin/isoping
}
sha512sums="b1c99962ab59f496d680639aea7929cb742ef8fac598f7ba7b6356d6cfe46b8b8d6ef1a0b7a9b05efa81ba5dbd3d406e38c75cd7b4bdfe34c0714d20f9d2b5a0 isoping-20170626.tar.gz
dd5b491cc17a10a3b53b642722d41bfa2823da39a1a01dd7ed826fb998b0752d175ab36e54ee3589a864b737dccde7f374fa7f0cba573fc99bd6d95a84bfbe71 0001-isoping-support-openssl-1.1.patch"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment