I have setup a site to which users authenticate against with openssl certificates.
Everything works just fine, be I wish to be able to redirect to a error page with instructions instead of displaying the default error page that firefox displays.
Firefox displays only the error page that has been configured in your (I guess) Apache. Check your httpd.conf or a related include file where errors are defined like for example:
Hello again, I've looked in to the httpd.conf but I cant figure out which error code apache generates and how to fetch it into an event.
What I know is that the server sends "SSL_ERROR_HANDSHAKE_FAILURE_ALERT" to the client, but I dont know how to use that error code to display an error page.
The 401 is the error code in this example which is what you can configure in your httpd.conf or include file for it, afaik.
When you reproduce that "SSL_ERROR_HANDSHAKE_FAILURE_ALERT" error, you should check what kind of entry you get added in the access log I mentioned above. Maybe you can write a directive for that then like mentioned in one of my former answers.