Microsoft MVP성태의 닷넷 이야기
오류 유형: 311. certutil 실행 오류 - 0x80070057 [링크 복사], [링크+제목 복사]
조회: 16522
글쓴 사람
정성태 (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)
13535정성태1/22/20242431닷넷: 2208. C# - GCHandle 구조체의 메모리 분석
13534정성태1/21/20242249닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/20242462닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/20242353닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/20242246닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20242200닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/20242058닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/20242183Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/20242127오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/20242211닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20242162오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20242225오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20242033오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/20242198닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/20242263닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/20242005오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....'
13519정성태1/10/20242096닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/20242362닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
13517정성태1/8/20242202스크립트: 63. Python - 공개 패키지를 이용한 위성 이미지 생성 (pystac_client, odc.stac)
13516정성태1/7/20242314닷넷: 2196. IIS - AppPool의 "Disable Overlapped Recycle" 옵션의 부작용
13515정성태1/6/20242590닷넷: 2195. async 메서드 내에서 C# 7의 discard 구문 활용 사례 [1]
13514정성태1/5/20242263개발 환경 구성: 702. IIS - AppPool의 "Disable Overlapped Recycle" 옵션
13513정성태1/5/20242188닷넷: 2194. C# - WebActivatorEx / System.Web의 PreApplicationStartMethod 특성
13512정성태1/4/20242153개발 환경 구성: 701. IIS - w3wp.exe 프로세스의 ASP.NET 런타임을 항상 Warmup 모드로 유지하는 preload Enabled 설정
13511정성태1/4/20242175닷넷: 2193. C# - ASP.NET Web Application + OpenAPI(Swashbuckle) 스펙 제공
13510정성태1/3/20242106닷넷: 2192. C# - 특정 실행 파일이 있는지 확인하는 방법 (Linux)
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...