aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-04-28 22:31:20 +0000
committerlloyd <[email protected]>2010-04-28 22:31:20 +0000
commit0f47cb60e703ca2de56286f07b4c9d91c7bba071 (patch)
tree5304fd84516c79f55e213755b2b2b99e6e65c9e0 /doc
parent6eec50d372143afcb3188f21d0991ace3e0d5e9e (diff)
parent50fc7b15553d888d95bee72972e53eae27a82c1f (diff)
propagate from branch 'net.randombit.botan' (head a5f25a3b954f24c5d07fa0dab6c4d76f63767165)
to branch 'net.randombit.botan.c++0x' (head a365694b70b4b84ca713272d56d496acca351cb5)
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/tls_client.cpp8
-rw-r--r--doc/examples/tls_server.cpp28
-rw-r--r--doc/log.txt9
-rwxr-xr-xdoc/scripts/dist.sh12
4 files changed, 39 insertions, 18 deletions
diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp
index b60941eb2..5006e0a1a 100644
--- a/doc/examples/tls_client.cpp
+++ b/doc/examples/tls_client.cpp
@@ -31,6 +31,8 @@ int main()
std::string http_command = "GET /bitbashing\r\n";
tls.write((const byte*)http_command.c_str(), http_command.length());
+ u32bit total_got = 0;
+
while(true)
{
if(tls.is_closed())
@@ -38,9 +40,13 @@ int main()
byte buf[16+1] = { 0 };
u32bit got = tls.read(buf, sizeof(buf)-1);
- printf("Got %d bytes: %s", got, buf);
+ printf("%s", buf);
fflush(0);
+
+ total_got += got;
}
+
+ printf("Retrieved %d bytes total\n", total_got);
}
catch(std::exception& e)
{
diff --git a/doc/examples/tls_server.cpp b/doc/examples/tls_server.cpp
index 39453dbfd..ff4265937 100644
--- a/doc/examples/tls_server.cpp
+++ b/doc/examples/tls_server.cpp
@@ -4,7 +4,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/init.h>
+#include <botan/botan.h>
#include <botan/tls_server.h>
#include <botan/unx_sock.h>
@@ -31,30 +31,34 @@ int main(int argc, char* argv[])
{
LibraryInitializer init;
- std::auto_ptr<RandomNumberGenerator> rng(
- RandomNumberGenerator::make_rng());
+ AutoSeeded_RNG rng;
- RSA_PrivateKey key(*rng, 512);
- //DSA_PrivateKey key(get_dl_group("DSA-1024"));
+ //RSA_PrivateKey key(rng, 1024);
+ DSA_PrivateKey key(rng, DL_Group("dsa/jce/1024"));
X509_Cert_Options options(
- "www.randombit.net/US/Syn Ack Labs/Mathematical Munitions Dept");
+ "localhost/US/Syn Ack Labs/Mathematical Munitions Dept");
X509_Certificate cert =
- X509::create_self_signed_cert(options, key, "SHA-1", *rng);
+ X509::create_self_signed_cert(options, key, "SHA-1", rng);
Unix_Server_Socket listener(port);
- printf("Now listening on port %d...\n", port);
-
while(true)
{
try {
+ printf("Listening for new connection on port %d\n", port);
+
Socket* sock = listener.accept();
printf("Got new connection\n");
- TLS_Server tls(*rng, *sock, cert, key);
+ TLS_Server tls(rng, *sock, cert, key);
+
+ std::string hostname = tls.requested_hostname();
+
+ if(hostname != "")
+ printf("Client requested host '%s'\n", hostname.c_str());
printf("Writing some text\n");
@@ -63,8 +67,8 @@ int main(int argc, char* argv[])
printf("Now trying a read...\n");
- char buf[10] = { 0 };
- u32bit got = tls.read((byte*)buf, 9);
+ char buf[1024] = { 0 };
+ u32bit got = tls.read((byte*)buf, sizeof(buf)-1);
printf("%d: '%s'\n", got, buf);
tls.close();
diff --git a/doc/log.txt b/doc/log.txt
index 89e95aa14..5df146912 100644
--- a/doc/log.txt
+++ b/doc/log.txt
@@ -1,9 +1,16 @@
-* 1.9.6-dev, ????-??-??
+* 1.9.7, 2010-04-27
+ - TLS: Support reading SSLv2 client hellos
+ - TLS: Add support for SEED ciphersuites (RFC 4162)
+ - Add Comb4P hash combiner function
+ - Fix checking of EMSA_Raw signatures with leading 0 bytes
+
+* 1.9.6, 2010-04-09
- TLS: Add support for TLS v1.1
- TLS: Support server name indicator extension
- TLS: Fix server handshake
- TLS: Fix server using DSA certificates
+ - TLS: Avoid timing channel between CBC padding check and MAC verification
* 1.9.5, 2010-03-29
- Numerous ECC optimizations
diff --git a/doc/scripts/dist.sh b/doc/scripts/dist.sh
index 152b7e89b..479de24d1 100755
--- a/doc/scripts/dist.sh
+++ b/doc/scripts/dist.sh
@@ -6,9 +6,11 @@
SELECTOR=h:net.randombit.botan
KEY_ID=EFBADFBC
MTN_DB=/storage/mtn/botan.mtn
-WEB_DIR=$HOME/projects/www/files/botan/v1.9/
DIST_DIR=~/Botan-dist
+DIST_FILES_DIR=$HOME/projects/www/files/botan/v1.9/
+WEB_DOCS_DIR=$HOME/projects/www/htdocs/botan/htdocs/
+
# You shouldn't have to change anything after this
mkdir -p $DIST_DIR
cd $DIST_DIR
@@ -39,7 +41,7 @@ do
rm -f $doc.aux $doc.log $doc.dvi $doc.toc
done
-cp log.txt ../..
+botan_log_to_html log.txt > ../../log.html
cd .. # topdir
cd .. # now in DIST_DIR
@@ -60,5 +62,7 @@ read -a PASSWORD -p "Enter PGP password (or ^C to skip signatures): "
echo $PASSWORD | gpg --batch --armor -b --passphrase-fd 0 -u $KEY_ID Botan-$VERSION.tgz
echo $PASSWORD | gpg --batch --armor -b --passphrase-fd 0 -u $KEY_ID Botan-$VERSION.tbz
-mv Botan-$VERSION.tgz* $WEB_DIR
-mv Botan-$VERSION.tbz* $WEB_DIR
+mv Botan-$VERSION.tgz* Botan-$VERSION.tbz* $DIST_FILES_DIR
+mv log.html $WEB_DOCS_DIR
+
+echo "Now edit download.html, and add a release notice to pyblosxom"