device/fido: migrate to crypto/hash APIs
IN REVIEW2026crypto
2026. 9. 9.
dev-hw
crypto/sha2.h를 최신 표준인 crypto/hash.h로 교체하는 Cleanup 작업입니다.
문제 설명
crypto/sha2.h를 최신 표준인 crypto/hash.h로 교체하는 Cleanup 작업입니다.
수정한 폴더:
- device/fido
- device/fido/ctap_get_assertion_request.h
- device/fido/enclave/enclave_protocol_utils.h
- device/fido/enclave/enclave_protocol_utils.cc
- device/fido/large_blob.cc
- device/fido/virtual_u2f_device.cc
- device/fido/win/authenticator_unittest.cc
- device/fido/win/fake_webauthn_api.cc
해결 내용
코드 수정
- #include "crypto/sha2.h"
+ #include "crypto/hash.h" - crypto::kSHA256Length
+ crypto::hash::kSha256Size - crypto::SHA256Hash
+ crypto::hash::Sha256테스트 방법
- 빌드 확인시 성공
autoninja -C out/Default device_unittests
out/Default/device_unittests --gtest_filter="*Fido*"배운 점
- 헤더 교체 시 빌드 에러 발생
- 헤더 파일을 새 버전으로 교체한 뒤, 소스 코드에서 수정이 누락된 부분이 있으면 빌드 단계에서 에러가 발생한다는 점을 알게 되었습니다.
- 게릿 merge conflict 발생
main 브랜치에서 pull을 하여도 동일 현상이 지속됨
git remote -v 명령어로 확인시 origin 주소가 로컬 캐시 디렉터리(~/.cache/depot_tools/...)를 바라보고 있음을 확인.
원격지 Fetch URL을 재설정
git remote set-url origin https://chromium.googlesource.com/chromium/src.git