Check-in [ee33ccc6af]
Overview
Comment:Updated to optinally generate commercial certs, and removed commercial certs from internal file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ee33ccc6af60f623c5991cb42b4c45cf947e438d
User & Date: rkeene on 2015-07-03 01:51:09
Other Links: manifest | tags
Context
2015-07-03
01:56
Updated OS X build script to reflect compatibility with newer releases of the OS check-in: 7fd0dc50ca user: kvanals tags: trunk
01:51
Updated to optinally generate commercial certs, and removed commercial certs from internal file check-in: ee33ccc6af user: rkeene tags: trunk
00:42
CACKey 0.7.2 check-in: a0b997c021 user: kvanals tags: trunk, 0.7.2
Changes

Modified build/builtin-certs-update from [5324a34988] to [9fea13231c].

4
5
6
7
8
9
10






11

ourdir="$(dirname "$(which "$0")")"
cd "${outdir}" || exit 1

make -C certs/dod distclean all
make -C certs/federal distclean all







./certs-to-c certs/*/*.crt > ../cackey_builtin_certs.h







>
>
>
>
>
>
|
4
5
6
7
8
9
10
11
12
13
14
15
16
17

ourdir="$(dirname "$(which "$0")")"
cd "${outdir}" || exit 1

make -C certs/dod distclean all
make -C certs/federal distclean all

if [ "$1" = '--commercial' ]; then
	commercial='commercial'
else
	commercial='SKIP'
fi

./certs-to-c certs/{dod,federal,$commercial}/*.crt > ../cackey_builtin_certs.h

Modified build/certs-to-c from [1cd87f2aca] to [e4223940e0].

1
2
3




4
5
6
7
8
9
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
25
26
27
#! /bin/bash

for file in "$@"; do




	rm -f tmpfile.x509
	if ! openssl x509 -in "${file}" -inform pem -noout -checkend 0 >/dev/null 2>/dev/null; then
		echo "warning: Skipping \"${file}\" as it is invalid or expired." >&2

		continue
	fi

	openssl x509 -in "${file}" -out tmpfile.x509 -inform pem -outform der

	pubkeylen="$(openssl x509 -in tmpfile.x509 -inform der -text -noout | grep 'RSA Public Key:' | sed 's@^.*(\([0-9][0-9]*\) bit).*$@\1@')"
	certlen="$(cat tmpfile.x509 | wc -c)"
	cert="$(( cat tmpfile.x509 | od -t x1 | cut -c 9- | tr "\n" ' '; echo ) | sed 's@ @@g;s@..@\\x&@g')"

	cat << _EOF_

	{
		CACKEY_ID_TYPE_CERT_ONLY, /* id_type */
		${certlen}, /* certificate_len */
		(unsigned char *) "${cert}", /* certificate */
		${pubkeylen} /* keysize */
	},
_EOF_
done

rm -f tmpfile.x509



>
>
>
>









|
|



>










1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /bin/bash

for file in "$@"; do
	if [ ! -f "${file}" ]; then
		continue
	fi

	rm -f tmpfile.x509
	if ! openssl x509 -in "${file}" -inform pem -noout -checkend 0 >/dev/null 2>/dev/null; then
		echo "warning: Skipping \"${file}\" as it is invalid or expired." >&2

		continue
	fi

	openssl x509 -in "${file}" -out tmpfile.x509 -inform pem -outform der

	pubkeylen="$(openssl x509 -in tmpfile.x509 -inform der -text -noout | grep 'Public[- ]Key:' | sed 's@^.*(\([0-9][0-9]*\) bit).*$@\1@')"
	certlen="$(cat tmpfile.x509 | wc -c | awk '{ print $1 }')"
	cert="$(( cat tmpfile.x509 | od -t x1 | cut -c 9- | tr "\n" ' '; echo ) | sed 's@ @@g;s@..@\\x&@g')"

	cat << _EOF_
	/* ${file} */
	{
		CACKEY_ID_TYPE_CERT_ONLY, /* id_type */
		${certlen}, /* certificate_len */
		(unsigned char *) "${cert}", /* certificate */
		${pubkeylen} /* keysize */
	},
_EOF_
done

rm -f tmpfile.x509

Modified cackey_builtin_certs.h from [12e127fbbb] to [cffe24d77b].

cannot compute difference between binary files