In FIPS mode use PKCS#8 format when writing private keys: