Added certificate conversion functions