Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
- Update to official v1.3.1
  • Loading branch information
jelu committed Apr 11, 2024
1 parent e8b3aa6 commit 5da524f
Show file tree
Hide file tree
Showing 27 changed files with 10,059 additions and 31 deletions.
9 changes: 6 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ $(bin_PROGRAMS): $(lib_LTLIBRARIES)
endif

TESTS_BINARY = .libs/scramble_ips
EXTRA_DIST = test/ip* test/keyfile*

TESTS = blowfish aes sha1 md5
CMP = cmp -s

# variables to control test time
HEAD6S=1000
HEAD6R=1000

.PHONY: test
.PHONY: test
.PHONY: test_bf test_aes test_sha1 test_md5
.PHONY: test_one_bf test_one_aes test_one_sha1 test_one_md5

Expand All @@ -43,7 +43,7 @@ test_md5: T=md5
test_md5: all test_one_md5

test_one_aes test_one_bf test_one_sha1 test_one_md5:
@test -x scramble_ips || { \
@test -x ./scramble_ips || { \
echo "scramble_ips binary wasn't built, run './configure --with-scramble_ips'"; \
exit 1; \
}
Expand All @@ -63,6 +63,9 @@ test_one_aes test_one_bf test_one_sha1 test_one_md5:
&& echo " ipv6 descrambling test PASSED" \
|| echo " ipv6 descrambling test FAILED"

.PHONY: check
check: test

.PHONY: rpmbuild
rpmbuild: dist
cp $(distdir).tar.gz ~/rpmbuild/SOURCES
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
m4_define([cryptopANT_major_version], [1])
m4_define([cryptopANT_minor_version], [3])
m4_define([cryptopANT_micro_version], [0])
m4_define([cryptopANT_micro_version], [1])
m4_define([cryptopANT_version], [cryptopANT_major_version.cryptopANT_minor_version.cryptopANT_micro_version])

#format: current:revision:age
#If the library source code has changed at all since the last update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
#If the library source code has changed at all since the last update, then increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
#If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
#If any interfaces have been added since the last public release, then increment age.
#If any interfaces have been removed or changed since the last public release, then set age to 0.
#If any interfaces have been removed or changed since the last public release, then set age to 0.
#see also https://autotools.io/libtool/version.html
m4_define([cryptopANT_library_version], ["1:3:0"])
m4_define([cryptopANT_library_version], ["1:4:0"])

AC_INIT([cryptopANT], [cryptopANT_version], [[email protected]], [cryptopANT])
dnl m4_pattern_allow(AC_CONFIG_MACRO_DIRS)
Expand Down
8 changes: 5 additions & 3 deletions cryptopANT.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License: GPL
URL: http://ant.isi.edu/software/cryptopANT/index.html
Name: %{name}
Version: %{version}
Release: 1%{?dist}
Release: 1
Source: %{name}-%{version}.tar.gz
Packager: [email protected]
Prefix: /usr
Expand Down Expand Up @@ -46,10 +46,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_includedir}/*
%{_mandir}/man3/*
%{_libdir}/*.so
%{_libdir}/*.so.*
%{_libdir}/*.a
%exclude %{_libdir}/*.la
%{_bindir}/scramble_ips
%{_mandir}/man3/*

%changelog
* Mon Mar 25 2024 Yuri Pradkin <[email protected]> - 1.4.1
- Fixed blowfish regression introduced in 1.4.0
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
cryptopant (1.3.1-1~unstable+1) unstable; urgency=low

* Update to v1.3.1

-- Jerry Lundström <[email protected]> Thu, 11 Apr 2024 15:59:32 +0200

cryptopant (1.3.0-1~unstable+1) unstable; urgency=low

* Update to v1.3.0
Expand Down
3 changes: 0 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
override_dh_auto_configure:
./autogen.sh
dh_auto_configure -- --without-scramble_ips

override_dh_auto_test:
true
4 changes: 2 additions & 2 deletions m4/ltoptions.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
Expand Down
2 changes: 1 addition & 1 deletion m4/ltsugar.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
Expand Down
13 changes: 7 additions & 6 deletions m4/ltversion.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
Expand All @@ -9,15 +10,15 @@

# @configure_input@

# serial 4179 ltversion.m4
# serial 4245 ltversion.m4
# This file is part of GNU Libtool

m4_define([LT_PACKAGE_VERSION], [2.4.6])
m4_define([LT_PACKAGE_REVISION], [2.4.6])
m4_define([LT_PACKAGE_VERSION], [2.4.7])
m4_define([LT_PACKAGE_REVISION], [2.4.7])

AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.6'
macro_revision='2.4.6'
[macro_version='2.4.7'
macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
4 changes: 2 additions & 2 deletions m4/lt~obsolete.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
Expand Down
8 changes: 7 additions & 1 deletion rpm/cryptopant.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%define sover 1
%define libname libcryptopant%{sover}
Name: cryptopant
Version: 1.3.0
Version: 1.3.1
Release: 1%{?dist}
Summary: IP address anonymization library
Group: Development/Libraries/C and C++
Expand Down Expand Up @@ -56,6 +56,10 @@ sh autogen.sh
make %{?_smp_mflags}


%check
make test


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
Expand Down Expand Up @@ -88,6 +92,8 @@ rm -rf $RPM_BUILD_ROOT


%changelog
* Thu Apr 11 2024 Jerry Lundström <[email protected]> 1.3.1-1
- Update to v1.3.1
* Wed Mar 20 2024 Jerry Lundström <[email protected]> 1.3.0-1
- Update to v1.3.0
* Tue Oct 01 2019 Jerry Lundström <[email protected]> 1.2.1-1
Expand Down
17 changes: 13 additions & 4 deletions src/cryptopANT.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode:C; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright (C) 2004-2024 by the University of Southern California
* $Id: 08c7e189cae19260957f372fd3199a29447d2827 $
* $Id: cdc84b9fca5b7bc01d665de67bbe6358d0a8131f $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
Expand Down Expand Up @@ -445,6 +445,9 @@ scramble_init(const scramble_state_t *s)
case SCRAMBLE_BLOWFISH:
OSSL_PROVIDER_load(NULL, "legacy");
cipher4 = EVP_CIPHER_fetch(NULL, "BF-ECB", "provider=legacy");
if (cipher4 == NULL) {
cipher4 = EVP_CIPHER_fetch(NULL, "BF-ECB", NULL);
}
res_ctx = ctx4;
res_crypt = cipher4;
break;
Expand Down Expand Up @@ -483,6 +486,9 @@ scramble_init(const scramble_state_t *s)
case SCRAMBLE_BLOWFISH:
OSSL_PROVIDER_load(NULL, "legacy");
cipher6 = EVP_CIPHER_fetch(NULL, "BF-CBC", "provider=legacy");
if (cipher6 == NULL) {
cipher6 = EVP_CIPHER_fetch(NULL, "BF-ECB", NULL);
}
res_ctx = ctx6;
res_crypt = cipher6;
break;
Expand Down Expand Up @@ -553,6 +559,7 @@ scramble_init(const scramble_state_t *s)
int
scramble_init_from_file(const char *fn, scramble_crypt_t c4, scramble_crypt_t c6, int *do_mac)
{
// OSSL_PROVIDER *legacy_, *default_;
u_char pad[MAX_BLK_LENGTH];
u_char key[MAX_BLK_LENGTH];
u_char mac[MAX_BLK_LENGTH];
Expand Down Expand Up @@ -735,14 +742,16 @@ scramble_ip6(struct in6_addr *input, int pass_bits)
switch (scramble_crypto6) {
case SCRAMBLE_BLOWFISH:
/* use BF in chain mode */
if (!EVP_CipherInit_ex2(ctx6, cipher6, scramble_key, NULL, 1 /*encode*/, NULL)) {
EVP_CIPHER_CTX_reset(ctx6);
if (!EVP_EncryptInit_ex2(ctx6, cipher6, scramble_key, ivec, NULL)) {
fprintf(stderr,
"scramble_init(): EVP_CipherInit_ex2 failed:");
"scramble_init(): EVP_EncryptInit_ex2 failed:");
ERR_print_errors_fp(stderr);
}
if (!EVP_CipherUpdate(ctx6, (u_char*)&b6_out, &outlen, (u_char*)&b6_in, sizeof(b6_in))) {
/* Error */
fprintf(stderr, "scramble_ip6(): EVP_CipherUpdate failed");
fprintf(stderr, "scramble_ip6(): EVP_CipherUpdate failed\n");
ERR_print_errors_fp(stderr);
}
break;
case SCRAMBLE_AES:
Expand Down
2 changes: 1 addition & 1 deletion src/cryptopANT.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode:C; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright (C) 2004-2024 by the University of Southern California
* $Id: 280914920d2b6684efa33fd6f3ac6d49ce3f8884 $
* $Id: c23494984e1ae44af55668feda8232282c9473d0 $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
Expand Down
2 changes: 1 addition & 1 deletion src/scramble_ips.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* -*- Mode:C; c-basic-offset:4; tab-width:8; indent-tabs-mode:t -*- */
/*
* Copyright (C) 2004-2024 by the University of Southern California
* $Id: 5b5617578e43cc15592e055062260ca63b4ecfca $
* $Id: a91d5228a362749a1ccff71f0fbdc092ac7ebdcc $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
Expand Down
Loading

0 comments on commit 5da524f

Please sign in to comment.