2025-04-19  Simon J Gerraty  <sjg@beast.crufty.net>

	* Signer.py: return bytes from encode_sig

	* SignServer*.py: initialize sig_header as bytes so we can simply
	add it and the output of signer.encode_sig for our response.

2025-04-18  Simon J Gerraty  <sjg@beast.crufty.net>

	* SignServerPool.py: allow recv size to be set - like sign.py

	* Signer.py: get SigEncoding from conf, default is PEM.

	* openpgp-sign.py: check if Signer response is PEM encoded
	otherwise assume bytes.

	* Use str(e) rather than e.message for exceptions.

2025-04-09  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: ensure FileNotFoundError is set for python2

	* sign.py: allow ${progname}.cf settings to be reflected in
	defaults shown in usage message.
	Cleanup trailing white-space.

2025-04-08  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: add bump_debug() for handling potentially increasing
	debug level.

2025-04-04  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: make the internal loadConfig more compatible with
	that in conf.py

2025-03-17  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: allow conf to set 'recv_size' used to retrieve
	signature from server.  Default is 4k

2023-10-04  Simon J Gerraty  <sjg@beast.crufty.net>

	* ima-sign.py: fix for python3

2023-05-18  Simon J Gerraty  <sjg@beast.crufty.net>

	* signctl.py: take advantage of conf.py if we get it

	* vars.py: document the modifiers - lifted from bmake(1).

	* Sign{Agent,Proxy}.py: leverage conf.py read ${MYNAME}.cf
	and then ${progname:R}.cf

2023-05-15  Simon J Gerraty  <sjg@beast.crufty.net>

	* conf.py: += if existing value is a list behave as for [+=]

	* vars.py: += handle case of existing value being a list.

2023-04-19  Simon J Gerraty  <sjg@beast.crufty.net>

	* conf.py: Move initialization of config to initConfig
	add getBool allow for bool value

	* vars.py: add :_  :range and :sh

	* sign.py: deal with "user" in main so
	{ima,openpgp}-sign.py can ignore it.

2022-05-28  Simon J Gerraty  <sjg@beast.crufty.net>

	* conf.py: add simple conditionals and .include use $config_path

2022-05-25  Simon J Gerraty  <sjg@beast.crufty.net>

	* conf.py: add .[-]include

	* Pass reason, connect_to and addrinfo to diagnostics
	reason is 'resolve' or 'connect'

	* signctl.py: for shutdown, loop sending shutdown requests
	until connection fails.  This ensures rapid shutdown of all
	servers.

	* sign.py: add support for running diagnostics
	we import the module named by 'diagnostics'
	and instantiate the class of the same name.

2022-05-22  Simon J Gerraty  <sjg@beast.crufty.net>

	* conf.py: handle := treated the same as =

2022-05-21  Simon J Gerraty  <sjg@beast.crufty.net>

	* signctl.py: more Python3 lossage;
	send/recv need bytes, so comparison of msg must also be bytes

2021-06-01  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: more Python3 lossage;
	open using 'r' rather than 'rb' when we want text.

2021-04-08  Simon J Gerraty  <sjg@beast.crufty.net>

	* Fix for Python3 which is intollerant of TAB indentation.

	* OpenSSLSigner.py: avoid hash_size being set as float (py3)
	also throw an error in sign if no key loaded.

	* conf.py: set 'config' to the path of the file we are reading
	and 'config_dir' to the realpath of the directory we read it from.

2020-01-07  Simon J Gerraty  <sjg@beast.crufty.net>

	* FakeHash.py: set upper limit on input as well as lower limit.

2019-11-01  Simon J Gerraty  <sjg@beast.crufty.net>

	* PoolServer.py: use self.bind_listen_sock()
	  which can handle AF_UNIX as well as AF_INET sockets.

2019-04-16  Simon J Gerraty  <sjg@beast.crufty.net>

	* Patch from Mark Baushke <mdb@juniper.net>
	  openpgp-sign.py: fix typo in error handling

2019-02-15  Simon J Gerraty  <sjg@beast.crufty.net>

	* libcrypto-compat: backwards compatability shim from wiki.openssl.org
	* signer.c: Use OpenSSL 1.1 API and add compat shim for older
	  versions.

2019-01-04  Simon J Gerraty  <sjg@beast.crufty.net>

	* sign.py: avoid creating output file if we have no response.

2018-07-18  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignServerPool.py: add request for Trust Anchors.

2018-03-26  Simon J. Gerraty  <sjg@bad.crufty.net>

	* convert-gpg-seckey-to-pem.c: refactor to handle private and pub
	  keys as well as dearmor.

	* ossl.pyx,signer.c: handle loading keys from non-PEM format files.

2018-03-16  Simon J. Gerraty  <sjg@bad.crufty.net>

	* pem.py: skip any noise within the header.

2017-10-26  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Add request for TrustAnchor (rootCA cert).
	  sign.py --ta ta.pem

	* Allow for server config to use bmake(1) style variable
	references to env variables and existing settings.
	eg. TrustAnchor=certs/rootCA.pem
	    CRL=${TrustAnchor:R}.crl

	Note: sign.py does *not* support this, so ensure any config
	it reads does not have variable references in settings that matter
	to sign.py

2017-08-04  Simon Gerraty  <sjg@kaos.jnpr.net>

	* sign.py: use getaddrinfo() rather than gethostbyname()
	  so that we get all the addresses we can try in one hit.
	  This better allows us to cycle through them until we successfully
	  connect.

	  For the case of AF_UNIX url we fake addrinfo result
	  so that urlconnect just needs to consume addrinfo as from
	  getaddrinfo().

2017-02-03  Simon Gerraty  <sjg@bad.crufty.net>

	* sign.py: log uid if getpwuid fails

2017-01-22  Simon J. Gerraty  <sjg@bad.crufty.net>

	* sign.py: handle total lack of consistency in socket.EAI_*

2017-01-20  Simon J. Gerraty  <sjg@bad.crufty.net>

	* signing-server.txt: elaborate on FakeHash.

2017-01-15  Simon J. Gerraty  <sjg@bad.crufty.net>

	* sign.py: Resolve url when we create signing client so we can detect
	  that we need to use default_ip
	  Factor out exception handling logic to avoid duplictaion.

2017-01-13  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Allow the keys we log to be configured

2017-01-11  Simon J. Gerraty  <sjg@bad.crufty.net>

	* sign.py: provide for SIGNER_DEFAULT_IP as fallback for when DNS
	  fails.
 	  Also Linux defines different error codes for EAI, so use the
	  defines.

2015-12-30  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Remove unnecessary use of getConfig()

2015-10-01  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Add crls request

2015-09-30  Simon Gerraty  <sjg@bad.crufty.net>

	* SignServerPool.py: add 'crls:' request.
	just like 'certs:' we simply return the content of a file
	which is expected (by client) to contain something useful.
	
2015-04-29  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Patch from Mark Baushke <mdb@juniper.net>
	
	openpgp-sign.py: Careful reading of RFC 4880 Section 5.2.3.4
	MUST have a signature creation time subpacket in the hashed
	area. This means that the signature created via
	--without-timestamp is not a valid signature 
	Remove the option.
	

2015-02-10  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignServerPool.py: catch Exception as e and check for errno

	* openpgp-sign.py, ima-sign.py: sign.error()

	* OpenSSLSigner.py
	If hname matches "fake*N" we need to adapt to what client sends.
	We set hash_size to 0 and determine the hash name to pass to
	OpenSSL based on the size of the digest we recieve.
	This is particularly useful to the openpgp client.

	* sign.py: raise ValueError if port is out of range.
	Also when we catch an exception don't assume it has an 'errno' member.
	

2015-01-28  Simon J. Gerraty  <sjg@bad.crufty.net>

	* Import significant contribution from Juniper Networks, Inc.

	Mark Baushke <mdb@juniper.net> notes:

	A few contributions are added which are also released under the
	same license as the rest of your package. The IMA work was a clean
	room implementation that did not make use of GPL/LGPL sources. The
	OpenPGP work was also done just using RFC 4880 as the basis for
	how things work.

	Interoperability has been tested with evmctl-utils from Linux and
	GnuPG as well as a version of GPL GRUB2 with support for digital
	signatures.

	For the openpgp-sign.py implementation, if the --without-timestamp
	v4 signatures are created, it is needful to use the GnuPG command
	option '--ignore-time-conflict' to verify the signature outside of
	GRUB to avoid problems with the timestamp being missing.

	* SignServerPool.py: Add a new SetKnobs option to allow the
	configuration files to provide information useful for signing as
	either IMA or OpenPGP subclass methods. The protocol is wrapped such
	that other subclass methods may add additional protocol glue if
	needed beyond what the original sign.py wire protocol used. The
	result may use either a PEM encoded signature or some other format
	if the subclass chooses to override the default.

	* Signer.py: Add comments to each of the functions in the class and
	extend the superclass with a begin() and end() and encode_sig()
	set of functions.

	* ima-sign.py: A subclass of sign.py used to create Linux Integrity
	Measurement Architecture signatures for inclusion in extended
	attributes. The output format is intended to be consumed by the
	setfattr(1) GNU/Linux command using the --restore option.

	* openpgp-sign.py: A subclass of sign.py used to create a detached
	signature of a binary file. The signature may be in .asc
	(ascii-armored) or .sig (binary) and may be in either v3 format or
	v4 format (with or without a signature timestamp). Useful for
	integration with rpm signatures or other detached signatures. The
	GNU GRUB2 'verified boot / Secure Boot' functionality release does
	not support v3 signatures, but may use v4 signatures with or
	without a signature timestamp.

	* pem.py: Some performance improvements.

	* sign.py: Has been rewritten as a class to allow subclasses to build
	on it.

	* imasigner/Makefile: A makefile to build the printimakeyid used by
	ima-sign.py to calculate the IMAv2 key identification.

	* imasigner/printimakeyid.c: Simple program to print out the IMAv2
	signature id for a public key.

	* openpgp-utils/Makefile: A makefile to build a simple tool to convert
	an unsigned OpenPGP format private key into a secret key that is
	able to be used by sign.py for signing objects.

	* openpgp-utils/convert-gpg-seckey-to-pem.c: A simple program to
	convert an OpenPGP format private key to a standard private key able
	to be used by sign.py superclass.

	* src/signer.c: Changes to clean up signer.c to avoid errors and to
	use OpenSSL APIs with error checking.

2014-10-09  Simon J. Gerraty  <sjg@bad.crufty.net>

	* LICENSE.txt: add a hopefully clear indication of the terms under
	  which folk are welcome to use this. 

2014-10-06  Simon Gerraty  <sjg@bad.crufty.net>

	* FakeHash.py: if digest_size is not provided, work it out.
	  input must be even and at least enough to represent MD5 digest.

2014-08-24  Simon J. Gerraty  <sjg@bad.crufty.net>

	* src/signer.c: pick up fixes from amesh at juniper
	  for inconsistent use of OpenSSL APIs.
	
2014-08-19  Simon J. Gerraty  <sjg@bad.crufty.net>

	* OpenSSLSigner.py: verify should follow logic of sign for any
	  expectation of success. 
	  if fakehash is not sha1 compute size from last 3 digits?
	  unit-test use matching hash to generate input.
	  Use self.ossl so sub-class can override.

	* Signer.py: add begin/end methods for cases where pre-negotiatin
	  is needed.

	* SignServerPool.py: move body of process_request to process_body
	  to ensure end() is always afterwards.

	* src/ossl.pyx: use correct load function for load_pubkey
	
2014-08-03  Simon J. Gerraty  <sjg@bad.crufty.net>

	* OpenSSLSigner.py: lose 'fake' from hash name so we pass correct
	  name to signer.
	
2014-02-11  Simon J. Gerraty  <sjg@bad.crufty.net>

	* PoolServer.py: add handling for SIGALRM and timeout waiting for
	  input.
	* SignServerPool.py: wait up to timeout seconds for input, else
	  drop connection.

2014-01-29  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignServerPool.sign_msg(): We cannot strip() msg as that breaks
	  backwards compatability for other than FakeHash.

2014-01-28  Simon J. Gerraty  <sjg@bad.crufty.net>

	* sign.py: option -x to pass extended info to server
	* SignServerPool.py: if extended info recieved, log it.

2013-12-23  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignAgent.py: don't proceed without valid SSH_AUTH_SOCK
	* sign.py: provide error()

2013-12-22  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignAgent.py: re-connect to "server" as needed.
	* SignProxy.py: re-connect to "server" as needed and exit when
	  idle too long.

2013-12-14  Simon J. Gerraty  <sjg@bad.crufty.net>

	* src/ossl.pyx: Cython interface to signer.c

	* OpenSSLSigner,SignServerPool: use p3compat to keep
	  Python3 happy.
	
2013-12-13  Simon J. Gerraty  <sjg@bad.crufty.net>

	* p3compat.py: provide b() and s() to convert strings/bytes
	  when needed.
	* pem.py: use p3compat
	
2013-08-21  Simon J. Gerraty  <sjg@bad.crufty.net>

	* SignServerPool.py: log the actual message received.

2013-07-18  Simon J. Gerraty  <sjg@bad.crufty.net>

	* OpenSSLSigner: add verify method
	* verify.py: use OpenSSLSigner by default.
	
2013-05-21  Simon J. Gerraty  <sjg@bad.crufty.net>

	* FILES: list of files to distribute
	  we only inlcude the OpenSSLSigner - the most useful.

2013-04-30  Simon J. Gerraty  <sjg@bad.crufty.net>

	* rc_sigs: add status exit 0 if all ok
	
2013-04-28  Simon J. Gerraty  <sjg@bad.crufty.net>

	* rc_sigs: start/stop/check script
	  defaults to performing operation for all configs.

