-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error : Digest method not supported while using winston.transports.DailyRotate #90
Comments
@patilms16 try modifying the Winston module to include the option audit_hash_type when getting the stream If that works, please update the Winston issue you've raised to ask to include that as an option. The line below is from the README audit_hash_type Use specified hashing algorithm for audit. Defaults to 'md5'. Use 'sha256' for FIPS compliance. |
@rogerc Thanks for the Suggestion. Next, I verified that version of file-stream-rotator being used in my node_modules is 0.5.7. In this version we don't have audit_hash_type, instead it directly uses 'md5'. Hence Winston module needs to be updated to include audit_hash_type as an option. Then I can use the latest versions. |
Created a PR in winston-daily-rotate-file to pass audit_hash_type |
Environment :
OS : SUSE Linux Enterprise Server 15 SP2
Node: 14.16.0
Express: 4.17.1,
winston: 3.2.1,
winston-daily-rotate-file: 4.4.2
I am using following code :
and getting error as "Digest method not supported" from FileStreamRotator ( which usage crypto submodule of nodejs)
Below is actual line which was throwing error from File "FileStreamRotator.js" under node_modules :
crypto.createHash('md5').update(logfile + "LOG_FILE" + time).digest("hex")
I posted similar question on winston-daily-rotate-file repo (winstonjs/winston-daily-rotate-file#340) , but as this issue seems related to FileStreamRotator and dependent crypto submodule of node, posting the question here.
Also raised same question on stack-overflow : https://stackoverflow.com/questions/71552510/error-digest-method-not-supported-while-using-winston-transports-dailyrotate
Please check below screenshot for openssl version and algorithm list for the platforms where I am using the function ( Please note : for Helios platform function is working fine without any error but for SLES platform it does throw error )
Can someone please help to identify the issue here and probable solution?
The text was updated successfully, but these errors were encountered: