{"record":{"id":"d921d5261d261a3c","repo":"uutils/coreutils","slug":"openssl-hasher-update-failed","errorCode":null,"errorMessage":"OpenSSL hasher update failed","messagePattern":"OpenSSL hasher update failed","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/uucore/src/lib/features/sum.rs","lineNumber":525,"sourceCode":"\n        impl $algo_type {\n            pub const BIT_SIZE: usize = $size;\n        }\n\n        impl Default for $algo_type {\n            fn default() -> Self {\n                match openssl::hash::Hasher::new($md) {\n                    Ok(h) => Self::OpenSsl(h),\n                    Err(_) => Self::PureRust(<$rust_type>::default()),\n                }\n            }\n        }\n\n        impl Digest for $algo_type {\n            fn hash_update(&mut self, input: &[u8]) {\n                match self {\n                    Self::OpenSsl(h) => {\n                        h.update(input).expect(\"OpenSSL hasher update failed\");\n                    }\n                    Self::PureRust(h) => digest::Digest::update(h, input),\n                }\n            }\n\n            fn hash_finalize(&mut self, out: &mut [u8]) {\n                match self {\n                    // `finish` finalizes the hash and resets the underlying context.\n                    Self::OpenSsl(h) => {\n                        let result = h.finish().expect(\"OpenSSL hasher finish failed\");\n                        out.copy_from_slice(&result);\n                    }\n                    Self::PureRust(h) => {\n                        let result = digest::Digest::finalize_reset(h);\n                        out.copy_from_slice(&result);\n                    }\n                }\n            }","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/uutils/coreutils/blob/0b77ced48502a5f80c51dfa827af7e69f3687053/src/uucore/src/lib/features/sum.rs#L507-L543","documentation":"Error \"OpenSSL hasher update failed\" thrown in uutils/coreutils.","triggerScenarios":"Occurs when the OpenSSL-backed hasher fails during a digest update call.","commonSituations":"Internal OpenSSL errors while streaming data into a hash, e.g. corrupted OpenSSL state.","solutions":["Ensure the OpenSSL context is initialized before update and not reused after finish.","Report the underlying OpenSSL error and retry with a fresh hasher instance."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0b77ced48502a5f80c51dfa827af7e69f3687053","analyzedAt":"2026-08-19T21:43:27.871Z","contentChangedAt":"2026-08-19T21:43:27.871Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}