fixing a bug where certificates were always generated as server.... sorry :S