Testing Python log output

Imagine you have a module and want to make sure everything’s working, so you test. For functions the idea is usually pretty simple: Provide some inputs, see if the output looks as expected. But what the function is also supposed to write some log messages and you want to check if they look the wayContinue reading “Testing Python log output”

Fun with Javascript, or: Setting document.referrer

It’s a bit of an odd thing for me to say, but yesterday I had some fun playing with Javascript. I maintain a little Firefox add-on called “Referer Modifier” to modify the HTTP Referer header, an since Web Extensions became the standard for browser extension Javascript is simply the language of choice for that. InContinue reading “Fun with Javascript, or: Setting document.referrer”

So, about THAT GnuTLS session ticket bug (CVE-2020-13777)

It’s been almost two weeks ago now that I discovered the bug in GnuTLS now known as CVE-2020-13777. The report is issue #1011 on the GnuTLS bug tracker. Here I want to talk a bit about how I discovered the bug and some thoughts on its impact. Session resumption for mod_gnutls I was working onContinue reading “So, about THAT GnuTLS session ticket bug (CVE-2020-13777)”

New in Java 8: Catching Integer Overflows

I’ve recently discovered a nice new feature in Java 8: methods to properly handle integer overflows. Consider the following example: When you compile and run it, this is the result: Quite obviously, this can’t be mathematically right. The problem occurs because an int has a limited size of 4 byte. When this size is tooContinue reading “New in Java 8: Catching Integer Overflows”

Standardized Evil is no less Evil

Maybe you’ve heard about the proposal to include „Encrypted Media Extensions“ (EME) into the HTML5 standard. In short, EME would provide a standardized way to require an unspecified decryption module to play media streams on an HTML5 page, mainly for the purpose of DRM. Those who want to sell it say DRM is short forContinue reading “Standardized Evil is no less Evil”

Set Tab Width for Indentation in Emacs

I’ve been working with Strongswan for a while now and created a few patches to enhance conftest, the testing framework included in Strongswan. Like most software projects, Strongswan requires that patches adhere to their coding style. I wanted to configure my Emacs to take care of that, but only for the Strongswan source directory becauseContinue reading “Set Tab Width for Indentation in Emacs”

Playing with Verilog

This is the first programming post since I came to Japan. If you just want to know what I’m up to and are not interested in the technology, you can stop reading after the first paragraph, although you’re welcome to read on and enjoy the pictures. 😉 The last few weeks I’ve been reading aContinue reading “Playing with Verilog”

GnuTLS and GLib, Part 1: Threads

[Edit (2011-12-25)] It looks like the way to select the the mutex functions changed slightly since I published this post. Please consult the current documentation to see the difference! [/Edit] When a network application needs privacy and possibly authentication, using SSL or TLS is often the solution. One of the libraries that are commonly usedContinue reading “GnuTLS and GLib, Part 1: Threads”