First Stable Release

The version number is incremented to 1.0.0.

Thanks to doneir for reporting that a number of unit test were failing.
This was because two test certificates had expired. This commit replaces
these with updated certificates, along with the tool used for programmatic
certificate generation. The new certificates are set to remain valid for
approximately ten years.
incoming
Ray 2014-01-18 18:02:25 -08:00
parent 805cea0a0b
commit 7a4919c839
9 changed files with 137 additions and 78 deletions

17
ChangeLog 100644
View File

@ -0,0 +1,17 @@
2014-01-18 Ray Brown <code@liquibits.com>
* setup.py: First stable version, 1.0.0
* dtls/test/makecerts: Generate valid and current certificates for
unit test suite
* dtls/test/openssl_ca.cnf: Configuration file for CA certificate
* dtls/test/openssl_server.cnf: Configuration file for server
certificate
* dtls/test/certs/ca-cert.pem: updated certificate, valid for 10 years
* dtls/test/certs/server-cert.pem: updated certificate, valid for
10 years
* dtls/test/certs/keycert.pem: updated server certificate from server-cert.pem, along with that certificate's private key
* dtls/test/server-key.pem: deleted (it was not needed)
2012-12-31 Ray Brown <code@liquibits.com>
* All: Version 0.1.0: initial public release

View File

@ -1,13 +1,13 @@
-----BEGIN CERTIFICATE-----
MIIB3TCCAYegAwIBAgIJAJdD48tCuQ4ZMA0GCSqGSIb3DQEBBQUAMEoxCzAJBgNV
BAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRMwEQYDVQQKEwpSYXkgQ0EgSW5j
MREwDwYDVQQDEwhSYXlDQUluYzAeFw0xMjA5MjEyMTE0MTZaFw0xMzA5MjEyMTE0
MTZaMEoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRMwEQYDVQQK
EwpSYXkgQ0EgSW5jMREwDwYDVQQDEwhSYXlDQUluYzBcMA0GCSqGSIb3DQEBAQUA
A0sAMEgCQQC33ThS1uvx6c9/jdQgPrLnVepv9NJdtyRMIDH3ZVfIKwwC6Nde3CJh
bdo3j2njxlY7pw0P6J/F6mQpGtsRGaX1AgMBAAGjUDBOMB0GA1UdDgQWBBQBj0cB
lkz531jiz4oLP0osGlVR3zAfBg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INFYj
9l+29ZuMZSHTNQaFBovMXdk2B0xWQXmPTAKBF3A+ifVy3nAlSDoYJa9+LgH8eVCt
aDwkNpaga4NxOouHoph8N1ZOVYIGrek5bXiBV7d3XZHwHG708IryOu8CAwEAATAN
BgkqhkiG9w0BAQUFAAOBgQBw0XUTYzfiI0Fi9g4GuyWD2hjET3NtrT4Ccu+Jiivy
EvwhzHtVGAPhrV+VCL8sS9uSOZlmfK/ZVraDiFGpJLDMvPP5y5fwq5VGrFuZispG
X6bTBq2AIKzGGXxhwPqD8F7su7bmZDnZFRMRk2Bh16rv0mtzx9yHtqC5YJZ2a3JK
2g==
-----END CERTIFICATE-----

View File

@ -1,36 +1,14 @@
Certificate:
Data:
Version: 1 (0x0)
Serial Number: 1 (0x1)
Signature Algorithm: md5WithRSAEncryption
Issuer: C=US, ST=Washington, O=Ray CA Inc, CN=RayCAInc
Validity
Not Before: Sep 21 21:16:18 2012 GMT
Not After : Sep 21 21:16:18 2013 GMT
Subject: C=US, ST=Washington, O=Ray Srv Inc, CN=RaySrvInc
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (512 bit)
Modulus:
00:b8:f7:77:26:6c:9d:25:f5:e1:ca:28:b4:6a:0b:
15:81:13:0e:51:c3:b2:ba:57:5b:69:ff:cb:bb:86:
d9:f9:4d:33:1f:43:92:a1:89:2f:d0:08:5b:cf:b7:
a1:2b:ea:06:31:e5:32:fd:2b:86:54:09:fb:24:bc:
a3:ce:56:22:f1
Exponent: 65537 (0x10001)
Signature Algorithm: md5WithRSAEncryption
12:4c:55:17:c1:c4:19:5f:0d:e2:66:00:84:37:22:62:9b:6d:
9e:76:fd:a5:82:f5:a2:41:c6:ae:16:88:16:ab:bd:0f:5d:0b:
7c:fd:52:2a:9b:3f:ea:cf:ea:35:29:37:61:a2:15:8f:27:56:
38:71:1f:eb:1a:f8:cc:99:22:17
-----BEGIN CERTIFICATE-----
MIIBgDCCASoCAQEwDQYJKoZIhvcNAQEEBQAwSjELMAk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GAPhrV+VCL8sS9uSOZlmfK/ZVraDiFGpJLDMvPP5y5fwq5VGrFuZispG
X6bTBq2AIKzGGXxhwPqD8F7su7bmZDnZFRMRk2Bh16rv0mtzx9yHtqC5YJZ2a3JK
2g==
-----END CERTIFICATE-----

View File

@ -1,10 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAuPd3JmydJfXhyii0
agsVgRMOUcOyuldbaf/Lu4bZ+U0zH0OSoYkv0Ahbz7ehK+oGMeUy/SuGVAn7JLyj
zlYi8QIDAQABAkAygtnV82lC2Y/Mbis+nkJEGlkZuRCQ1JRRMRqI3n2eF6CviqF3
PiBXIEEExzKihC9bvbHKTAkYDLr+/4YpbiQBAiEA7JLS5Lp7KI/ayWwEzl2r5XXu
k/cbH++A4zZz6A9XIsECIQDIJ8ciDa5/VGyQnYMzBNgKnwaFDDBOiEUFDaU/9ZN8
MQIgCG3Gw819G9ncQrbtiOi/eiJ0iKMSPVYMMow7HvaE9UECIQCLyQwPwlJd5s4z
aW4ZkYZ4VHuvK8YI8q6RSuhf9Nhd4QIgFbRNdEeehgrzGzGug2yVCMzVzS3MQNBJ
6LqBZaPlFsM=
-----END PRIVATE KEY-----

View File

@ -0,0 +1,36 @@
#!/bin/bash -eu
##############################################################################
#
# Generate Certificates for PyDTLS Unit Testing
#
# This script is invoked manually (as opposed to by the unit test suite), in
# order to generate certain certificates that are required to be valid by
# the unit test suite.
#
# This script is not portable: it has been tested on Ubuntu 13.04 only. New
# certificates are written into the current directory.
#
# Copyright 2014 Ray Brown
#
##############################################################################
DIR=`dirname "$0"`
# Generate self-signed certificate for the certificate authority
echo Generating CA...; echo
openssl req -config "$DIR/openssl_ca.cnf" -x509 -newkey rsa -nodes -keyout tmp_ca.key -out ca-cert.pem -days 3650
# Generate a certificate request
echo Generating certificate request...; echo
openssl req -config "$DIR/openssl_server.cnf" -newkey rsa -nodes -keyout tmp_server.key -out tmp_server.req
# Sign the request with the certificate authority's certificate created above
echo Signing certificate request...; echo
openssl x509 -req -in tmp_server.req -CA ca-cert.pem -CAkey tmp_ca.key -CAcreateserial -days 3650 -out server-cert.pem
# Build pem file with private and public keys, ready for unprompted server use
cat tmp_server.key server-cert.pem > keycert.pem
# Clean up
rm tmp_ca.key tmp_server.key tmp_server.req ca-cert.srl

View File

@ -0,0 +1,11 @@
RANDFILE = $ENV::HOME/.rnd
[ req ]
distinguished_name = req_distinguished_name
prompt = no
[ req_distinguished_name ]
C = US
ST = Washington
O = Ray CA Inc
CN = RayCAInc

View File

@ -0,0 +1,11 @@
RANDFILE = $ENV::HOME/.rnd
[ req ]
distinguished_name = req_distinguished_name
prompt = no
[ req_distinguished_name ]
C = US
ST = Washington
O = Ray Srv Inc
CN = RaySrvInc

View File

@ -33,7 +33,7 @@ for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
NAME = "Dtls"
VERSION = "0.1.0"
VERSION = "1.0.0"
DIST_DIR = "dist"
FORMAT_TO_SUFFIX = { "zip": ".zip",
@ -59,7 +59,10 @@ def invoke_setup(data_files=None):
data_files = load(fl)
except IOError:
data_files = []
data_files.append(('dtls', ["NOTICE", "LICENSE", "README.txt"]),)
data_files.append(('dtls', ["NOTICE",
"LICENSE",
"README.txt",
"ChangeLog"]),)
setup(name=NAME,
version=VERSION,
description="Python Datagram Transport Layer Security",
@ -69,7 +72,10 @@ def invoke_setup(data_files=None):
license="LICENSE",
long_description=open("README.txt").read(),
packages=["dtls", "dtls.demux", "dtls.test"],
package_data={"dtls.test": ["certs/*.pem"]},
package_data={"dtls.test": ["makecerts",
"openssl_ca.cnf",
"openssl_server.cnf",
"certs/*.pem"]},
data_files=data_files,
)
finally:
@ -104,11 +110,12 @@ def make_dists():
except OSError:
pass
rename(source_name, target_name)
# Finally the distribution without prebuilts
argv.append("--formats=zip,gztar")
invoke_setup()
if __name__ == "__main__":
# Full upload sequence for new version:
# python setup.py sdist --formats=zip,gztar upload
# python setup.py sdist --prebuilts
# Manually add .sdist_with_openssl. archives to repository
if argv[-1] == "--prebuilts":
del argv[-1]
make_dists()