Use method rsa keygen first if FIPS mode if it is a FIPS method.