Skip to content

Railroad Spike Knife

Blacksmith KnifeThe is a knife made from a high carbon railroad spike. The blade is flat ground and about 4.5in long. The whole knife is a little bit longer than 10in. The twist in the handle feels nice in the hand. HC in this case apparently means 1030 which is pretty low carbon content for a knife. While it got to be very sharp, the edge is probably not going to stay that way for very long.


Blacksmith Knife (finished)Forging this was a lot of fun and using the spring fuller really helped with separating the steel from the handle and the blade. Making this knife actually didn't take very long. About an hour of forging time, a couple hours of grinding and polishing.

Categories: Hacking
Defined tags for this entry: ,

Libevent 2.0.4-alpha released

Libevent 2.0.4-alpha is now available for download:

http://monkey.org/~provos/libevent-2.0.4-alpha.tar.gz
http://monkey.org/~provos/libevent-2.0.4-alpha.tar.gz.sig

The complete change list is available here.

Some of the feature improvements include:
  • bufferevents can now be rate limited
  • http connections can now resolve host names asynchronously
  • a facility for lock debugging
  • arc4random() for evdns

However, we (that means mostly Nick) have also made a large number of bug fixes and stability improvements across many platforms. Many thanks to everyone who helped by providing bug reports and patches including Brodie Thiesfield, Dagobert Michelsen, Evan Jones, Joachim Bauch, Pavel Plesov, Roman Puls, Sebastian Hahn, William Ahern, Yasuoka Masahiko and Zhuang Yuyao.

In a separate email, Nick also provided a much more verbose description of what all changed.
Categories: Libevent, News
Defined tags for this entry: ,

Cable Tantos

Cable TantoAlthough, I have made various attempts at forging knives, this tanto is the first knife I have completed. It's a shinogi-zukuri tanto with choji hamon. The steel was made from forge-welded high carbon cable. Originally, this was supposed to become a wakizashi, but due to a bad hammer blow when forging the sunobe, I had to fold it over and no longer had enough steel for a longer blade. As a result, the blade is only about 9in long. The habaki was made from brazed copper and the shira-saya was carved from a popular blank.


Cable TantosThe picture to the left shows two more cable tantos in various stages of progress. The top one had some rough grinding done to it whereas the bottom one is straight from the forge. Only about 10% of the time is actually spent forging the blades. The rest of time is spent grinding, polishing and working on the habaki as well as on the saya and everything else.

Categories: Hacking
Defined tags for this entry: , , ,

OpenSSL Client Certificates and Libevent-2.0.3-alpha

Tom Pusateri reported success with using OpenSSL client certificates and libevent's builtin OpenSSL support. Here is what he wrote on the mailing list:

I tried 2.0.3 alpha against the Apple Push notification feedback service which requires a client key/certificate and it works great.

One hint... Make sure you add the key and cert to the SSL context before calling SSL_new(). Otherwise, you'll get an error that looks like:
sslv3 alert handshake failure in SSL routines SSL3_READ_BYTES
Here's the working code:

static void
init_feedback_service(struct event_base *ev_base,
    struct evdns_base *dns)
{
   int rc;
   struct bufferevent *bev;
   SSL_CTX *ssl_ctx;
   SSL *ssl;

   ssl_ctx = SSL_CTX_new(SSLv3_method());

   rc = SSL_CTX_use_certificate_file(ssl_ctx, "my_apple_cert_key.pem",
       SSL_FILETYPE_PEM);
   if (rc != 1) {
       errx(EXIT_FAILURE, "Could not load certificate file");
   }
   rc = SSL_CTX_use_PrivateKey_file(ssl_ctx, "my_apple_cert_key.pem",
       SSL_FILETYPE_PEM);
   if (rc != 1) {
       errx(EXIT_FAILURE, "Could not load private key file");
   }

   ssl = SSL_new(ssl_ctx);
   bev = bufferevent_openssl_socket_new(ev_base, -1, ssl,
       BUFFEREVENT_SSL_CONNECTING, BEV_OPT_CLOSE_ON_FREE);
   bufferevent_setcb(bev, feedback_read_cb, NULL,
       feedback_event_cb, NULL);
   rc = bufferevent_socket_connect_hostname(bev, dns, AF_INET,
       "feedback.sandbox.push.apple.com", 2196);
   if (rc < 0) {
       warnx("could not connect to feedback service: %s",
             evutil_socket_error_to_string(EVUTIL_SOCKET_ERROR()));
       bufferevent_free(bev);
       return;
   }
   bufferevent_enable(bev, EV_READ);
}
Categories: Libevent
Defined tags for this entry:

Libevent-2.0.3-alpha release

It has been a while since the last alpha release of libevent-2.0. Yesterday, we released 2.0.3-alpha which can be downloaded from

http://monkey.org/~provos/libevent-2.0.3-alpha.tar.gz

Please, give it a spin and let us know if you run into any problems. There have been a lot of changes since the last release, mostly due to Nick's hard work. Here are just some highlights, the ChangeLog contains the full story:

- SSL/TLS support on bufferevents, using the OpenSSL library
- Improved searching on evbuffer objects
- Improved support for Windows
- More efficient memory allocation for event_bases that use epoll
- Improved thread-safety
- The IOCP bufferevent backend is now exposed on Windows; many thanks to Christopher Davis for his work.

Many thanks to everyone who helped with patches and bug reports including Rocco Carbone, Brodie Thiesfield, Caitlin Mercer, David Reiss, Alexander Pronchenkov, Jacek Masiulaniec, Ka-Hing Cheung, Christopher Davis, Ferenc Szalai, and Ryan Phillips.

Edited to fix the link.
Categories: Libevent, News
Defined tags for this entry: ,

Libevent 1.4.13-stable released

We just released a new stable version of Libevent that fixes the following problems:
  • If the kernel tells us that there are a negative number of bytes to read from a socket, do not believe it. Fixes bug 2841177; found by Alexander Pronchenkov.
  • Do not allocate the maximum event queue and fd array for the epoll backend at startup. Instead, start out accepting 32 events at a time, and double the queue's size when it seems that the OS is generating events faster than we're requesting them. Saves up to 512K per epoll-based event_base. Resolves bug 2839240.
  • Fix compilation on Android, which forgot to define fd_mask in its sys/select.h
  • Do not drop data from evbuffer when out of memory; reported by Jacek Masiulaniec
  • Rename our replacement compat/sys/_time.h header to avoid build a conflict on HPUX; reported by Kathryn Hogg.
  • Build kqueue.c correctly on GNU/kFreeBSD platforms. Patch pulled upstream from Debian.
  • Fix a problem with excessive memory allocation when using multiple event priorities.
  • When running set[ug]id, don't check the environment. Based on a patch from OpenBSD.

A new alpha release of libevent 2.0 is on its way, too. Thanks to everyone who submitted patches and bug reports.

The source code is available at http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz. Don't forget to verify the signature.
Categories: Libevent, News
Defined tags for this entry: ,