update cms code to use X509_ALGOR_set_md instead of internal function