Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

standardized header format #7

Open
wants to merge 50 commits into
base: gene/stdheader
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
98ae0fe
Update mkarray to use the re-entrant safe strtok_r rather than strtok.
petergoldstein Aug 15, 2017
4e486be
added missing include for strlcat() - thanks to Andreas Schulze
juh Aug 9, 2017
d3864cc
fix a typo in arc_validate_msg() leading to memory corruption in
juh Aug 9, 2017
598db3e
make rsa-sha256 the default signing algorithm
Aug 4, 2017
dc43ef8
added bracaes
Aug 9, 2017
e09909f
Split signing and verification to enable SHA-1 handling
Aug 2, 2017
e8a9611
Support for Simple Canonicalization
Jul 25, 2017
ae1f8fc
Fix assorted issues raised by MSK
petergoldstein Aug 16, 2017
9a5521e
Fix missing semicolons
petergoldstein Aug 16, 2017
1172450
Fix more semicolons
petergoldstein Aug 16, 2017
bf5c358
spelling: arbitrary
jsoref Aug 21, 2017
f191bfd
spelling: existing
jsoref Aug 21, 2017
d868c4b
spelling: openarc
jsoref Aug 21, 2017
914dc88
spelling: parameters
jsoref Aug 21, 2017
40c59cb
spelling: technologies
jsoref Aug 21, 2017
7da494d
Split signing and verifying mode. In signing mode, consider any
Aug 25, 2017
affebf5
Reject duplicate tags.
Aug 25, 2017
ced0265
Merge branch 'master' of github.com:mskucherawy/OpenARC
Aug 25, 2017
7f8a072
Don't use the A-R ARC result from our authserv-id if we're in signing…
Aug 29, 2017
117548b
When arc_eoh() fails, mark the chain state as failed, and don't do an…
Aug 29, 2017
2d694f1
Add support for InternalHosts, and infer mode from that if it wasn't
Aug 29, 2017
3e9d05c
Optionally ignore duplicate tags being added to plists. We want to r…
Aug 31, 2017
b0a7850
Swap order of signing and verifying in arc_eoh().
Sep 6, 2017
8d3fead
fix loop in arcf_list_load();
juh Aug 18, 2017
d430475
added new function arcf_addlist() to add entries to a list;
juh Aug 18, 2017
8282fae
ignore connections from hosts on the PeerList
juh Aug 18, 2017
9764e08
restored the correct word "iff";
juh Aug 25, 2017
51322c5
renamed (accidentally?) changed PeerList option back to what it was;
juh Sep 4, 2017
c2cc550
Fix up auto-mode code, and tests of peer lists and internal lists.
Sep 6, 2017
26e931f
Tweak InternalHosts documentation
Sep 6, 2017
f2f9f0c
Update copyrights
Sep 6, 2017
1acbacc
Copy configured mode to connection context's mode when the former is …
Sep 6, 2017
6acfb7e
If the chain has already failed, don't do anything in arc_body().
Sep 6, 2017
f6b57dc
o Fix seal generation on malformed sets.
Sep 13, 2017
942cd16
Enforce a minimum key size. (Not yet exposed to the config file.)
Sep 13, 2017
2400310
o Reject an AMS if "bh" is missing
Oct 11, 2017
6b89579
More validation tightening.
Oct 11, 2017
1d50668
Fix strtoul() call.
Oct 11, 2017
b47cbe8
More validations; handle messages with no header fields
Oct 11, 2017
98e38ed
Tighter "i=" testing
Oct 11, 2017
ddb0b6b
arc_check_uint() now requires > 0
Oct 11, 2017
667851b
Enforce minimum key size inbound
Oct 11, 2017
1bb9999
Close brace in libopenarc/arc.h.
Oct 12, 2017
8ee5d92
Append our chain status when both sealing and verifying.
Nov 23, 2017
9543483
Set release date.
Dec 6, 2017
7932f71
Clean up RPM spec
mdomsch Jul 24, 2017
0b955c3
More RPM spec cleanup
flowerysong Sep 15, 2017
13a3d91
For real fixed mkarray
Aug 4, 2017
54a2c3a
Header externs
May 19, 2017
26f5e78
rebased & cleaned up
Aug 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ stamp-h1

# compilation artifacts
libopenarc/symbols.map
openarc/.libs/
openarc/.libs/
2 changes: 1 addition & 1 deletion KNOWNBUGS
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ http://www.trusteddomain.org. For descriptions of bugs that
have been fixed, see the file RELEASE_NOTES.

This list is not guaranteed to be complete. Check the Trusted Domain Project
web site for additional pending bugs and feature requests.
web site for additional pending bugs and feature requests.

[TBD]
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010-2014, 2016, The Trusted Domain Project.
# Copyright (c) 2010-2014, 2016, 2017, The Trusted Domain Project.
# All rights reserved.

AUTOMAKE_OPTIONS = foreign
Expand Down
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ latest updates.
+--------------+

The Trusted Domain Project (TDP) is a non-profit corporation dedicated to
research and development of techologies that promote trust in the use of
research and development of technologies that promote trust in the use of
domain names in on the Internet. OpenARC is an initiative of TDP, and is
primarily community effort to develop and maintain an open source library
for producing ARC-aware applications, and a "milter"-based filter for
Expand Down Expand Up @@ -211,7 +211,7 @@ with successful use of the DKIM service. The two features are MASQUERADE_AS
and FEATURE(genericstable). See cf/README in the open source sendmail
source code distribution for more information.

Due to the way the milter protocol is incorporated into the MTA, opnarc
Due to the way the milter protocol is incorporated into the MTA, openarc
sees the headers before they are modified as required by those two features.
This means any signature is generated based on the headers originally
injected by the mail client and not on the headers which are actually sent
Expand Down Expand Up @@ -246,5 +246,5 @@ re-generate your configuration and restart the filter:
FEATURE(`nocanonify')

--
Copyright (c) 2010-2012, 2014, 2016, The Trusted Domain Project.
Copyright (c) 2010-2012, 2014, 2016, 2017, The Trusted Domain Project.
All rights reserved.
4 changes: 2 additions & 2 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This listing shows the versions of the OpenARC package, the date of
release, and a summary of the changes in that release.

0.1.0 2016/04/01
Initial early release.
0.1.0 2017/12/06
Initial pre-release.
38 changes: 1 addition & 37 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# Copyright (c) 2009-2016, The Trusted Domain Project. All rights reserved.
# Copyright (c) 2009-2017, The Trusted Domain Project. All rights reserved.
#

#
Expand Down Expand Up @@ -883,42 +883,6 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
SYSCONFDIR=`eval echo "$sysconfdir"`
AC_SUBST([SYSCONFDIR])

#
# for contrib/spec/openarc.spec.in
#

installbin="no"
specconfig=""
specrequires=""
specbuildrequires=""

SPECBINDIR=""
if test x"$installbin" = x"yes"
then
SPECBINDIR="%{_bindir}/*"
fi

SPECCONFIGURE="$specconfig"

if test x"$specrequires" = x""
then
SPECREQUIRES=""
else
SPECREQUIRES="Requires:$specrequires"
fi

if test x"$specbuildrequires" = x""
then
SPECBUILDREQUIRES=""
else
SPECBUILDREQUIRES="BuildRequires:$specbuildrequires"
fi

AC_SUBST(SPECBINDIR)
AC_SUBST(SPECCONFIGURE)
AC_SUBST(SPECREQUIRES)
AC_SUBST(SPECBUILDREQUIRES)

#
# Finish up
#
Expand Down
211 changes: 134 additions & 77 deletions contrib/spec/openarc.spec.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# Copyright (c) 2010, 2011, 2016, The Trusted Domain Project.
# All rights reserved.
%global systemd (0%{?fedora} >= 18) || (0%{?rhel} >= 7)
%global tmpfiles (0%{?fedora} >= 15) || (0%{?rhel} >= 7)

Summary: An open source library and milter for providing ARC service
Name: openarc
Version: @VERSION@
Release: 1
License: BSD
Group: System Environment/Daemons
Release: 1%{?dist}
License: BSD and Sendmail
URL: https://github.com/mskucherawy/OpenARC

BuildRequires: libtool
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libbsd)

# sendmail-devel renamed for F25+
%if 0%{?fedora} > 25
BuildRequires: sendmail-milter-devel
%else
BuildRequires: sendmail-devel
%endif

Requires: lib%{name}%{?_isa} = %{version}-%{release}
Requires: libopenarc = %{version}-%{release}
BuildRequires: sendmail-devel, openssl-devel
@SPECREQUIRES@
@SPECBUILDREQUIRES@
Source: openarc-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires(pre): shadow-utils
%if %systemd
# Required for systemd
%{?systemd_requires}
BuildRequires: systemd
%else
# Required for SysV
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
Requires(postun): initscripts
%endif

Source0: openarc-%{version}.tar.gz
Prefix: %{_prefix}

%description
Expand All @@ -22,120 +43,156 @@ providing ARC service through milter-enabled MTAs.

%package -n libopenarc
Summary: An open source ARC library
Group: System Environment/Libraries

%description -n libopenarc
This package contains the library files required for running services built
using libopenarc.

%package -n libopenarc-devel
Summary: Development files for libopenarc
Group: Development/Libraries
Requires: libopenarc
Requires: lib%{name}%{?_isa} = %{version}-%{release}

%description -n libopenarc-devel
This package contains the static libraries, headers, and other support files
required for developing applications against libopenarc.

%prep
%setup
%autosetup -p1

%build
# Required for proper OpenSSL support on some versions of RedHat
if [ -d /usr/include/kerberos ]; then
INCLUDES="$INCLUDES -I/usr/include/kerberos"
fi
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --libdir=%{_libdir} --mandir=%{_mandir} @SPECCONFIGURE@ CPPFLAGS="$INCLUDES"

make
%configure --disable-static

make %{?_smp_mflags}
%install
make install DESTDIR="$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"%{_sysconfdir}
mkdir -p "$RPM_BUILD_ROOT"%{_initrddir}
install -m 0755 contrib/init/generic/openarc "$RPM_BUILD_ROOT"%{_initrddir}/%{name}
echo '## Basic OpenARC config file for verification only
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}
mkdir -p -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
rm -r %{buildroot}%{_prefix}/share/doc/openarc
rm %{buildroot}/%{_libdir}/*.la


cat > %{buildroot}%{_sysconfdir}/openarc.conf <<EOF
## See openarc.conf(5) or %{_docdir}/%{name}-%{version}/openarc.conf.sample for more
PidFile %{_localstatedir}/run/openarc/openarc.pid
Mode v
Syslog yes
Syslog yes
#Umask 002
#UserID openarc:mail
#Socket local:%{_localstatedir}/run/openarc/openarc.socket
Socket inet:8891@localhost
UserID openarc:openarc
Socket inet:8894@localhost

## After setting Mode to "sv", running
## openarc-genkey -D %{_sysconfdir}/openarc -s key -d `hostname --domain`
## opendkim-genkey -D %{_sysconfdir}/openarc -s key -d `hostname --domain`
## and putting %{_sysconfdir}/openarc
#Canonicalization relaxed/simple
#Domain example.com # change to domain
#Selector key
#KeyFile %{_sysconfdir}/openarc/key.private
' > "$RPM_BUILD_ROOT"%{_sysconfdir}/openarc.conf
rm -r "$RPM_BUILD_ROOT"%{_prefix}/share/doc/openarc

%post
#SignatureAlgorithm rsa-sha256
EOF


%if %systemd
install -d -m 0755 %{buildroot}%{_unitdir}
cat > %{buildroot}%{_unitdir}/%{name}.service << 'EOF'
[Unit]
Description=Authenticated Receive Chain (ARC) Milter
Documentation=man:%{name}(8) man:%{name}.conf(5) http://www.trusteddomain.org/%{name}/
After=network.target nss-lookup.target syslog.target

[Service]
Type=forking
PIDFile=%{_localstatedir}/run/%{name}/%{name}.pid
EnvironmentFile=-%{_sysconfdir}/sysconfig/%{name}
ExecStart=/usr/sbin/%{name} $OPTIONS
ExecReload=/bin/kill -USR1 $MAINPID
User=%{name}
Group=%{name}

[Install]
WantedBy=multi-user.target
EOF
%else
mkdir -p %{buildroot}%{_initrddir}
install -m 0755 contrib/init/redhat/%{name} %{buildroot}%{_initrddir}/%{name}
%endif

%if %{tmpfiles}
install -p -d %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF
D %{_localstatedir}/run/%{name} 0700 %{name} %{name} -
EOF
%endif

%pre
if ! getent passwd openarc >/dev/null 2>&1; then
%{_sbindir}/useradd -M -d %{_localstatedir}/lib -r -s /bin/false openarc
if ! getent group openarc >/dev/null; then
%{_sbindir}/groupadd openarc
%{_sbindir}/usermod -g openarc openarc
fi
if getent group mail >/dev/null; then
%{_sbindir}/usermod -G mail openarc
fi
fi
test -d %{_localstatedir}/run/openarc || mkdir %{_localstatedir}/run/openarc
chown openarc:openarc %{_localstatedir}/run/openarc
if [ ! -d %{_sysconfdir}/openarc ]; then
mkdir %{_sysconfdir}/openarc
chmod o-rx %{_sysconfdir}/openarc
openarc-genkey -D %{_sysconfdir}/openarc -s key -d `hostname --domain`
chown -R openarc:openarc %{_sysconfdir}/openarc
fi
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --add openarc
elif [ -x /usr/lib/lsb/install_initd ]; then
/usr/lib/lsb/install_initd openarc
%{_sbindir}/useradd -M -d %{_localstatedir}/lib -r -s /bin/false openarc
if ! getent group openarc >/dev/null; then
%{_sbindir}/groupadd openarc
%{_sbindir}/usermod -g openarc openarc
fi
if getent group mail >/dev/null; then
%{_sbindir}/usermod -G mail openarc
fi
fi
exit 0


%post

%if %systemd
%systemd_post %{name}.service
%else
/sbin/chkconfig --add %{name} || :
%endif


%preun
if [ $1 = 0 ]; then
service openarc stop && rm -f %{_localstatedir}/run/openarc/openarc.sock && rmdir %{_localstatedir}/run/openarc 2>/dev/null
if [ -x /sbin/chkconfig ]; then
/sbin/chkconfig --del openarc
elif [ -x /usr/lib/lsb/remove_initd ]; then
/usr/lib/lsb/remove_initd openarc
fi
userdel openarc
if getent group openarc >/dev/null; then
groupdel openarc
fi
%if %systemd
%systemd_preun %{name}.service
%else
if [ $1 -eq 0 ]; then
service %{name} stop >/dev/null || :
/sbin/chkconfig --del %{name} || :
fi
exit 0
%endif

%post -n libopenarc -p /sbin/ldconfig

%postun -n libopenarc -p /sbin/ldconfig

%clean
if [ "$RPM_BUILD_ROOT" != "/" ]; then
rm -rf "$RPM_BUILD_ROOT"
fi

%files
%defattr(-,root,root)
%doc LICENSE LICENSE.Sendmail README RELEASE_NOTES
%config(noreplace) %{_sysconfdir}/openarc.conf
%config %{_initrddir}/%{name}

%if %{tmpfiles}
%{_tmpfilesdir}/%{name}.conf
%else
%dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
%endif

%if %{systemd}
%{_unitdir}/%{name}.service
%else
%{_initrddir}/%{name}
%endif
%{_mandir}/*/*
%{_sbindir}/*
@SPECBINDIR@


%files -n libopenarc
%doc LICENSE LICENSE.Sendmail
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n libopenarc-devel
%defattr(-,root,root)
%doc libopenarc/docs/*.html
%doc LICENSE LICENSE.Sendmail
%{_includedir}/*
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Sun Jul 23 2017 Matt Domsch <[email protected]> 0.1.0-1
- update to Fedora Packaging Guidelines
Loading