OpenSSL CA certificates indexation

OpenSSL can use a CAPath to search for certificates to index, but you could overlook how it actually searches for them. You can specify a CAPath in openSSL by using the function SSL_CTX_load_verify_locations, but it won’t work as is. As described in this page, it will need the certificates to be rehashed with the “c_rehash .” command. Except on some environment like many embedded devices (the one you put busybox on), you can’t use it because it’s way too heavy (or not worth installing). You can do the same thing by issuing these commands: ...

November 13, 2013 · Florent Clairambault

Cassandra CQL3 internal data structure

I’m a huge fan of cassandra, I’ve been playing with it since 0.7 and I’ve never stopped using it. It would say it’s most amazing features are: Always working and simple replication + predictable performances. I was very happy when it went from a key-value store to a well structured database with CQL. With CQL you can focus on your data, and less on how you should organize your own structure to handle it properly. Still, behind the wheels, it works the same (it’s still a KV store). That’s why it’s very important to understand how the internal structure is done: ...

August 13, 2013 · Florent Clairambault

Pieter Hintjens is a smart guy

I’m very interested by everything around internet of things technologies (M2M). And the components I like to follow closely are the distributed databases which allow to make timeseries without single point of failures like cassandra and hbase and the message broker like RabbitMQ and ZeroMQ. This little video isn’t really about ZeroMQ, it’s more about how build a community around a project. Personal creativity is great thing, we can all experience it some way or an other. Creating in a team gives you some new perspectives on how you can make better things (and, usually, be a better person). But creating as part of a community of people you don’t known and share your ideas/experiments/knownledges/insights with them is amazing. How to compile everyone’s mind into something better. I’ve personnaly had the best fun building things that evolved with time, on a daily basis. You know the agile methodology when you use it for real. ...

July 13, 2013 · Florent Clairambault

You can do any kind of project with any language

Our language helps us express our ideas and emotions. Computer science languages help us build things following our ideas. There are hundreds of computer science languages currently available to help do pretty much any kind of work. They were all built because (at least) one person once thought “this language isn’t good enough”. I often like to compare the capabilities of languages like C/C++, C#(.Net)/java, scala/python/ruby, javascript/coffeescript, etc. And I’m always amazed how the smallest changes that were brought to existing languages allowed to gain in efficiency and clarity. ...

July 6, 2013 · Florent Clairambault

Deploying your maven web apps on glassfish with jenkins

Simple deployment If you installed your Jenkins CI on the same host as the Glassfish server, this is easy. You just have to let maven do its thing and then add this shell command: /usr/local/glassfish/bin/asadmin --echo=true --host=localhost --port=4848 --user=admin --passwordfile=/secure/place/for/passwords/domain1_password --secure=false deploy --force=true --name=myproject --contextroot=/myproject target/*.war The /secure/place/for/passwords/domain1_password file should contain this: AS_ADMIN_PASSWORD=the_password Deploying different versions With parametrized builds, you can go a little further and decide, for instance, if you want to deploy the current version as the production one or not. You can switch the build as a parametrized one and add a “stable” parameter (with a default value of false), for example. ...

June 28, 2013 · Florent Clairambault

Debconf issue

If you have this: debconf: DbDriver "config": mkdir :No such file or directory You might just have deleted /var/cache/debconf. Solving this is easy: mkdir -f /var/cache/debconf apt-get -f install

May 18, 2013 · Florent Clairambault

Valgrind might be wrong

Sometimes valgrind can report the right problem with the wrong stack trace: make && sudo valgrind --db-attach=yes --leak-check=full --track-origins=yes --show-reachable=yes ./dist/Debug/cbadaemon ==4423== Memcheck, a memory error detector ==4423== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==4423== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==4423== Command: ./dist/Debug/cbadaemon ==4423== ==4423== Conditional jump or move depends on uninitialised value(s) ==4423== at 0x4922C47: __pthread_mutex_unlock_usercnt (pthread_mutex_unlock.c:38) ==4423== by 0x804E91A: ServerContext::ServerContext() (ServerContext.cpp:11) ==4423== by 0x804EB92: ServerCore::ServerCore(int, char**) (ServerCore.cpp:15) ==4423== by 0x804F627: main (main.cpp:57) ==4423== Uninitialised value was created by a heap allocation ==4423== at 0x48D273C: operator new(unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==4423== by 0x804F60F: main (main.cpp:57) ==4423== ==4423== ==4423== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y (gdb) bt #0 0x04922c47 in __pthread_mutex_unlock_usercnt (mutex=0x75e80d8, decr=1) at pthread_mutex_unlock.c:38 #1 0x0805d15b in RequestManager::RequestManager (this=0x75e8030) at src/transac/RequestManager.cpp:27 #2 0x0804e91b in ServerContext::ServerContext (this=0x75e802c) at src/server/ServerContext.cpp:11 #3 0x0804eb93 in ServerCore::ServerCore (this=0x75e8028, argc=1, argv=0xfef79b94) at src/server/ServerCore.cpp:15 #4 0x0804f628 in main (argc=1, argv=0xfef79b94) at src/main.cpp:57 (gdb) q And it’s not an optimization problem as it was compiled with: ...

April 24, 2013 · Florent Clairambault

SFR fibre

Latencies are really good :) --- www.google.fr ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 9013ms rtt min/avg/max/mdev = 2.185/2.799/3.635/0.456 ms But I received an hadopi later. And still wish I knew why (there could be so many reasons).

March 10, 2013 · Florent Clairambault

Plex

Plex is great piece of software. It’s a “complete media solution”. I installed it on my laptop (free) without editing a single file, I tested it on my iPad (it’s a paid app) and it was just working instantly. Then I also tested it on my Nexus 7 (paid app on play store as well) and it’s also working perfectly. Then I discovered it can also do streaming through it’s web based interface, so it can stream to anything it doesn’t yet support. We could stop here but no: It can be installed on Debian stable hosts as well (which I love because they are easy to maintain [no daily updates and still pretty updated]). ...

February 25, 2013 · Florent Clairambault

Some good reasons for learning python

President Obama thinks required programming language learning in high school is a great idea. So do I, and I think we should all start with python. Writing code with it is very fast. When software engineers tell you “I can do it in 10 minutes”, in C/C++ they mean 4h, in java they mean 2h and in python they mean it. You can really do anything. I’ve done some serial communication, bit level manipulation, network level event-based servers, multithreading, webservice providing and consuming, SQL and cassandra client faster than what I’ve been doing in any other language. It’s easy to learn. You can start your first program right now and be good at it in 2 weeks. It comes “batteries included”. You don’t have to install third-party libraries. Contrary to ruby, you don’t have to choose between the thousands of gems available, there’s almost always one official way to do things. Which leads to the next point: It’s simple to read someone else’s code. This is because it’s high level language and you quickly know all the librairies. It now has some IDEs. I know some people like to code in vi, but this is ugly and unproductive. Pydev is simple to install and supports a pretty good (or not so bad) auto-completion. This leads me to two opposing ideas (but you’ll understand where I stand): ...

February 21, 2013 · Florent Clairambault