Microsoft MVP성태의 닷넷 이야기
오류 유형: 311. certutil 실행 오류 - 0x80070057 [링크 복사], [링크+제목 복사]
조회: 16426
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

certutil 실행 오류 - 0x80070057

아래의 문서에 보면,

Windows Enforcement of Authenticode Code Signing and Timestamping
; http://social.technet.microsoft.com/wiki/contents/articles/32288.windows-enforcement-of-authenticode-code-signing-and-timestamping.aspx

certuilt.exe를 실행하는 예제가 나옵니다. 그런데 실제로 그렇게 실행했더니 다음과 같이 ERROR_INVALID_PARAMETER 오류가 발생합니다.

C:\Windows\system32>certutil -setreg chain\Default\WeakSha1ThirdPartyAfterTime @01/01/2015
HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\OID\EncodingType 0\CertDllCreateCertificateChainEngine\Config\Default:
CertUtil: -setreg command FAILED: 0x80070057 (WIN32: 87 ERROR_INVALID_PARAMETER)
CertUtil: The parameter is incorrect.

왜냐하면, 이는 날짜 표기에 따른 차이때문입니다. 일단, 해당 명령을 실행할 운영체제의 날짜 표기 방법을 다음과 같이 date 명령어로 파악해서,

C:\Windows\system32>date
The current date is: 2015-11-13
Enter the new date: (yy-mm-dd)

이에 따라 "년-월-일" 순으로 다음과 같이 명령을 내려주면 됩니다. ^^

C:\Windows\system32>certutil -setreg chain\Default\WeakSha1ThirdPartyAfterTime @2015/01/01
HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\OID\EncodingType 0\CertDllCreateCertificateChainEngine\Config\Default:

New Value:
  WeakSha1ThirdPartyAfterTime REG_BINARY = 2015-01-01 오전 12:00
CertUtil: -setreg command completed successfully.
The CertSvc service may need to be restarted for changes to take effect.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 11/23/2015]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2020-08-31 02시22분
Certulitis - one tool that keeps on giving
; https://www.hexacorn.com/blog/2020/08/30/certulitis-one-tool-that-keeps-on-giving/

set CERTSRV_LOGFILE=c:\test\foo.log
set CERTSRV_DEBUG=0xFFFFFFFF

---------------------------------------------

openssl 3.0으로 만든 pfx의 -dump 출력 예제

c:\temp> certutil -dump -v d:\Settings\test_cert\win2008r2.pfx
Enter PFX password:
================ Certificate 0 ================
================ Begin Nesting Level 1 ================
Element 0:
X509 Certificate:
Version: 3
Serial Number: 3b345d76857a6d58c85d469dd2eb3e0e432a14ab
Signature Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.11 sha256RSA
    Algorithm Parameters:
    05 00
Issuer:
    CN=win2008r2
    O=Internet Widgits Pty Ltd
    S=Some-State
    C=AU
  Name Hash(sha1): 214111180f411526bf9668801e56fa6eeb04c174
  Name Hash(md5): e59d79b9526cc644c7a3ab58b9d8f327

 NotBefore: 2013-06-09 오후 12:03
 NotAfter: 2013-06-06 오후 12:03

Subject:
    CN=win2008r2
  Name Hash(sha1): 6389965a435cf7dcafbfc11b914909ef7ca955a4
  Name Hash(md5): 8ed715e917a11604e84557f076cf1e64

Public Key Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.1 RSA (RSA_SIGN)
    Algorithm Parameters:
    05 00
Public Key Length: 2048 bits
Public Key: UnusedBits = 0
    0000 30 82 01 0a 02 82 01 01 00 94 57 77 b3 86 e2 81
    0010 cb 26 ab fa 89 3b 6f 14 0c 13 e3 8a df 03 5b ea
    0020 e0 85 e2 16 9f 50 78 f9 11 77 5f f9 ff 85 a6 b8
    0030 57 47 ba f6 29 ea e2 d6 95 54 3b 52 6c 1e 54 34
    0040 d4 38 c1 f4 cf 81 d5 a7 87 84 ca 37 da 13 a4 8a
    0050 9c da 4f e8 9d 70 af 02 72 e0 84 d3 35 ee 83 e3
    0060 42 ab d0 e9 78 9e 1f 0b 6b d4 d8 9e 71 7c 87 c8
    0070 dd c7 06 e3 72 ba 12 6a c6 87 9a f6 93 3b b8 71
    0080 5f 95 43 db 5b e1 2d 65 3d c0 fa 8f a0 3e be 78
    0090 0c 50 95 56 01 80 89 dd ee ff 4a 16 34 77 4e 8d
    00a0 ee 62 9e 5e 30 30 dd 4e 32 9f 36 e3 6b 55 2c c8
    00b0 2e fe 4c 8a f5 74 1a 9c 22 21 67 74 30 7d dc 7a
    00c0 dd 19 8e b5 cf 77 ca 98 c0 ab f8 c6 72 e4 ed cb
    00d0 a6 1f 23 b9 9e 2c 1d d0 6f fd 0d b3 c9 d2 b0 52
    00e0 88 a1 3e 27 33 21 06 73 36 25 de 77 9d 7e a6 f1
    00f0 d0 95 f9 6e 13 4c f6 19 f9 7d 87 d5 f0 17 ae cf
    0100 83 1f d6 e4 f1 85 29 58 55 02 03 01 00 01
Certificate Extensions: 3
    2.5.29.17: Flags = 0, Length = d
    Subject Alternative Name
        DNS Name=win2008r2

    2.5.29.14: Flags = 0, Length = 16
    Subject Key Identifier
        c95b737ed76db5759f5ff808bae3d64e3b2d3268

    2.5.29.35: Flags = 0, Length = 18
    Authority Key Identifier
        KeyID=509d24f35e28d103c67cb63fcf37b5564ef9e0cb

Signature Algorithm:
    Algorithm ObjectId: 1.2.840.113549.1.1.11 sha256RSA
    Algorithm Parameters:
    05 00
Signature: UnusedBits=0
    0000 b1 4f 8f 61 0c cc 80 e7 4d c5 0e ae a4 65 da 05
    0010 aa 0e 44 84 ab 2e 22 82 cb 17 95 42 f2 7f fa d6
    0020 e7 b1 a8 34 9f c4 f4 38 65 c5 45 39 3f 18 38 83
    0030 8d a4 c7 5c 7b e4 9f 2b c0 2a 6a d5 be 32 45 92
    0040 8e b2 79 fc d7 b9 4f 16 a7 11 90 7a d1 8a ab 4c
    0050 de b2 b0 6e aa e1 25 ed 97 cb d1 45 68 85 d8 d5
    0060 e3 71 ad 75 a4 4f 76 2e d3 c3 1f ff aa f0 1a 59
    0070 c1 5c 0f 3c da be df f2 9b 81 f2 e1 1a 56 4c 70
    0080 aa 9b c9 ae 60 2c 57 f3 d2 9e 99 cc 69 6d ec 61
    0090 00 72 c4 62 85 0a 02 e5 23 1b d2 e3 b4 13 3d 8c
    00a0 96 49 ff bc 21 94 a6 3e 27 e5 9b 8a e5 fc db 1d
    00b0 db c5 54 1f f0 b1 cc da 01 5f 9d 8c d2 78 c5 df
    00c0 db 80 6b 51 ab 32 85 9f 95 25 c9 7c 41 08 9d e1
    00d0 30 6c ea a0 ad 96 bb 5a 9e e7 38 c4 30 26 a0 d0
    00e0 e6 e5 45 fc 30 d5 8c f9 7c 76 99 56 0d a6 30 b4
    00f0 06 80 70 19 1b 58 2c fd 59 e5 0a 31 65 0f e8 0c
Non-root Certificate
Key Id Hash(rfc-sha1): c95b737ed76db5759f5ff808bae3d64e3b2d3268
Key Id Hash(sha1): 4a7dd11cc60fc83c61cea78a4d54ca8359b2058a
Key Id Hash(bcrypt-sha1): 7dc133f69235b563d3805a7f4e2d0a7471732708
Key Id Hash(bcrypt-sha256): 10d8ed9c32ff2e0fd3f634ccc26c0314078e3f7aac5476bd0602bd2f3dfba249
Key Id Hash(md5): fdb5af2414f648270fdb85950da4b53b
Key Id Hash(sha256): 5e4045360826722b02c777cb7d05b7c43e07546c0eba5fdbdc28d986b6f14f63
Key Id Hash(pin-sha256): CumB32GxTzXY9zhxDEjyunyaqLkScBTMTFjZ2qrBvug=
Key Id Hash(pin-sha256-hex): 0ae981df61b14f35d8f738710c48f2ba7c9aa8b9127014cc4c58d9daaac1bee8
Cert Hash(md5): c15fbe1c21655759464ca1464b4d94d3
Cert Hash(sha1): f2f6e7b3779bf61f08a723114d05ac315aa78148
Cert Hash(sha256): a73e8a7c824f732833e60aa1b4f7dd25142807907f32d205c933690abd077877
Signature Hash: 767ec4baff549a741a675b7cfe630e99a21e31172336193ce2ca3a98fb7d01b6
---------------- End Nesting Level 1 ----------------

  CERT_KEY_IDENTIFIER_PROP_ID(20):
    c95b737ed76db5759f5ff808bae3d64e3b2d3268

  CERT_MD5_HASH_PROP_ID(4):
    c15fbe1c21655759464ca1464b4d94d3

  CERT_SHA1_HASH_PROP_ID(3):
    f2f6e7b3779bf61f08a723114d05ac315aa78148

  CERT_KEY_CONTEXT_PROP_ID(5):
    hCryptProv = 00000158B662A7A0
    KeySpec = 1 -- AT_KEYEXCHANGE

  CERT_ACCESS_STATE_PROP_ID(14):
  AccessState = 0

  Provider = Microsoft Enhanced Cryptographic Provider v1.0
  ProviderType = 1
  RSA
  PP_KEYSTORAGE = 1
    CRYPT_SEC_DESCR -- 1
  KP_PERMISSIONS = 3f (63)
    CRYPT_ENCRYPT -- 1
    CRYPT_DECRYPT -- 2
    CRYPT_EXPORT -- 4
    CRYPT_READ -- 8
    CRYPT_WRITE -- 10 (16)
    CRYPT_MAC -- 20 (32)

  ...[생략]...

    Allow Full Control NT AUTHORITY\SYSTEM
    Allow Full Control BUILTIN\Administrators
    Allow Full Control ...[생략]...


Private Key:
  PRIVATEKEYBLOB
  Version: 2
  aiKeyAlg: 0xa400
    CALG_RSA_KEYX
    Algorithm Class: 0xa000(5) ALG_CLASS_KEY_EXCHANGE
    Algorithm Type: 0x400(2) ALG_TYPE_RSA
    Algorithm Sub-id: 0x0(0) ALG_SID_RSA_ANY
  0000 52 53 41 32 RSA2
  0000 ...
  048c
Encryption test passed
CertUtil: -dump command completed successfully.
정성태

[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13601정성태4/19/2024214닷넷: 2243. C# - PCM 사운드 재생(NAudio)파일 다운로드1
13600정성태4/18/2024286닷넷: 2242. C# - 관리 스레드와 비관리 스레드
13599정성태4/17/2024342닷넷: 2241. C# - WAV 파일의 PCM 사운드 재생(Windows Multimedia)파일 다운로드1
13598정성태4/16/2024360닷넷: 2240. C# - WAV 파일 포맷 + LIST 헤더파일 다운로드1
13597정성태4/15/2024447닷넷: 2239. C# - WAV 파일의 PCM 데이터 생성 및 출력파일 다운로드1
13596정성태4/14/2024814닷넷: 2238. C# - WAV 기본 파일 포맷파일 다운로드1
13595정성태4/13/2024933닷넷: 2237. C# - Audio 장치 열기 (Windows Multimedia, NAudio)파일 다운로드1
13594정성태4/12/20241021닷넷: 2236. C# - Audio 장치 열람 (Windows Multimedia, NAudio)파일 다운로드1
13593정성태4/8/20241051닷넷: 2235. MSBuild - AccelerateBuildsInVisualStudio 옵션
13592정성태4/2/20241207C/C++: 165. CLion으로 만든 Rust Win32 DLL을 C#과 연동
13591정성태4/2/20241169닷넷: 2234. C# - WPF 응용 프로그램에 Blazor App 통합파일 다운로드1
13590정성태3/31/20241073Linux: 70. Python - uwsgi 응용 프로그램이 k8s 환경에서 OOM 발생하는 문제
13589정성태3/29/20241143닷넷: 2233. C# - 프로세스 CPU 사용량을 나타내는 성능 카운터와 Win32 API파일 다운로드1
13588정성태3/28/20241197닷넷: 2232. C# - Unity + 닷넷 App(WinForms/WPF) 간의 Named Pipe 통신파일 다운로드1
13587정성태3/27/20241156오류 유형: 900. Windows Update 오류 - 8024402C, 80070643
13586정성태3/27/20241300Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
13585정성태3/26/20241096Windows: 262. PerformanceCounter의 InstanceName에 pid를 추가한 "Process V2"
13584정성태3/26/20241049개발 환경 구성: 708. Unity3D - C# Windows Forms / WPF Application에 통합하는 방법파일 다운로드1
13583정성태3/25/20241158Windows: 261. CPU Utilization이 100% 넘는 경우를 성능 카운터로 확인하는 방법
13582정성태3/19/20241420Windows: 260. CPU 사용률을 나타내는 2가지 수치 - 사용량(Usage)과 활용률(Utilization)파일 다운로드1
13581정성태3/18/20241588개발 환경 구성: 707. 빌드한 Unity3D 프로그램을 C++ Windows Application에 통합하는 방법
13580정성태3/15/20241138닷넷: 2231. C# - ReceiveTimeout, SendTimeout이 적용되지 않는 Socket await 비동기 호출파일 다운로드1
13579정성태3/13/20241494오류 유형: 899. HTTP Error 500.32 - ANCM Failed to Load dll
13578정성태3/11/20241629닷넷: 2230. C# - 덮어쓰기 가능한 환형 큐 (Circular queue)파일 다운로드1
13577정성태3/9/20241876닷넷: 2229. C# - 닷넷을 위한 난독화 도구 소개 (예: ConfuserEx)
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...