get key from certificate