Replace the code for converting the spki_record and key_entry with functions.