Microsoft MVP성태의 닷넷 이야기
오류 유형: 311. certutil 실행 오류 - 0x80070057 [링크 복사], [링크+제목 복사],
조회: 16896
글쓴 사람
정성태 (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.
정성태

... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
12724정성태7/21/202110038개발 환경 구성: 582. 윈도우 환경에서 Visual Studio Code + Go (Zip) 개발 환경 [1]
12723정성태7/21/20217657오류 유형: 740. SharePoint - Alternate access mappings have not been configured 경고
12722정성태7/20/20217495오류 유형: 739. MSVCR110.dll이 없어 exe 실행이 안 되는 경우
12721정성태7/20/20218079오류 유형: 738. The trust relationship between this workstation and the primary domain failed. - 세 번째 이야기
12720정성태7/19/20217431Linux: 43. .NET Core/5+ 응용 프로그램의 Ubuntu (Debian) 패키지 준비
12719정성태7/19/20216621오류 유형: 737. SharePoint 설치 시 "0x800710D8 The object identifier does not represent a valid object." 오류 발생
12718정성태7/19/20217205개발 환경 구성: 581. Windows에서 WSL로 파일 복사 시 root 소유권으로 적용되는 문제파일 다운로드1
12717정성태7/18/20217142Windows: 195. robocopy에서 파일의 ADS(Alternate Data Stream) 정보 복사를 제외하는 방법
12716정성태7/17/20218045개발 환경 구성: 580. msbuild의 Exec Task에 robocopy를 사용하는 방법파일 다운로드1
12715정성태7/17/20219580오류 유형: 736. Windows - MySQL zip 파일 버전의 "mysqld --skip-grant-tables" 실행 시 비정상 종료 [1]
12714정성태7/16/20218385오류 유형: 735. VCRUNTIME140.dll, MSVCP140.dll, VCRUNTIME140.dll, VCRUNTIME140_1.dll이 없어 exe 실행이 안 되는 경우
12713정성태7/16/20218926.NET Framework: 1077. C# - 동기 방식이면서 비동기 규약을 따르게 만드는 Task.FromResult파일 다운로드1
12712정성태7/15/20218346개발 환경 구성: 579. Azure - 리눅스 호스팅의 Site Extension 제작 방법
12711정성태7/15/20218714개발 환경 구성: 578. Azure - Java Web App Service를 위한 Site Extension 제작 방법
12710정성태7/15/202110501개발 환경 구성: 577. MQTT - emqx.io 서비스 소개
12709정성태7/14/20217028Linux: 42. 실행 중인 docker 컨테이너에 대한 구동 시점의 docker run 명령어를 확인하는 방법
12708정성태7/14/202110486Linux: 41. 리눅스 환경에서 디스크 용량 부족 시 원인 분석 방법
12707정성태7/14/202177799오류 유형: 734. MySQL - Authentication method 'caching_sha2_password' not supported by any of the available plugins.
12706정성태7/14/20218904.NET Framework: 1076. C# - AsyncLocal 기능을 CallContext만으로 구현하는 방법 [2]파일 다운로드1
12705정성태7/13/20219083VS.NET IDE: 168. x64 DLL 프로젝트의 컨트롤이 Visual Studio의 Designer에서 보이지 않는 문제 - 두 번째 이야기
12704정성태7/12/20218238개발 환경 구성: 576. Azure VM의 서비스를 Azure Web App Service에서만 접근하도록 NSG 설정을 제한하는 방법
12703정성태7/11/202113930개발 환경 구성: 575. Azure VM에 (ICMP) ping을 허용하는 방법
12702정성태7/11/20219036오류 유형: 733. TaskScheduler에 등록된 wacs.exe의 Let's Encrypt 인증서 업데이트 문제
12701정성태7/9/20218712.NET Framework: 1075. C# - ThreadPool의 스레드는 반환 시 ThreadStatic과 AsyncLocal 값이 초기화 될까요?파일 다운로드1
12700정성태7/8/20219068.NET Framework: 1074. RuntimeType의 메모리 누수? [1]
12699정성태7/8/20217883VS.NET IDE: 167. Visual Studio 디버깅 중 GC Heap 상태를 보여주는 "Show Diagnostic Tools" 메뉴 사용법
... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...