Subject: [Ntp] ntp service fails to start when fips enabled in openssl-3.x

From: Shreenidhi Shedi <[email-masked]>
Date: Wed, 12 Jan 2022 11:30:24 +0000

Hi David L. Mills and NTP members,

ntp service fails to start when openssl-3.x fips is enabled.
ntp uses md5 algorithm in github code link<https://github.com/ntp-project/ntp/blob/9c75327c3796ff59ac648478cd4da8b205bceb77/libntp/a_md5encrypt.c#L40>

openssl-3.x has removed support for EVP_MD_CTX_FLAG_NON_FIPS_ALLOW and we need to use EVP_MD_fetch(...) API to make md5 work in fips mode.

I am attaching the patch to make this work.
Please let me know if I need to approach from different means to make this contribution.

We are using this fix already in Photon OS
https://github.com/vmware/photon/blob/4.0/SPECS/ntp/Get-rid-of-EVP_MD_CTX_FLAG_NON_FIPS_ALLOW.patch

--
Shedi