changed setup so ca certificates are now in the database
made cn primary key instead of id for nice urls