generate/store realm certificate