Added unpack_mime_cert function