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

... 61  62  63  64  65  66  67  [68]  69  70  71  72  73  74  75  ...
NoWriterDateCnt.TitleFile(s)
11935정성태6/9/201911870.NET Framework: 843. C# - PLplot 출력을 파일이 아닌 Window 화면으로 변경
11934정성태6/7/201913044VC++: 133. typedef struct와 타입 전방 선언으로 인한 C2371 오류파일 다운로드1
11933정성태6/7/201913082VC++: 132. enum 정의를 C++11의 enum class로 바꿀 때 유의할 사항파일 다운로드1
11932정성태6/7/201911643오류 유형: 544. C++ - fatal error C1017: invalid integer constant expression파일 다운로드1
11931정성태6/6/201911734개발 환경 구성: 441. C# - CairoSharp/GtkSharp 사용을 위한 프로젝트 구성 방법
11930정성태6/5/201912266.NET Framework: 842. .NET Reflection을 대체할 System.Reflection.Metadata 소개 [1]
11929정성태6/5/201912068.NET Framework: 841. Windows Forms/C# - 클립보드에 RTF 텍스트를 복사 및 확인하는 방법 [1]
11928정성태6/5/201910705오류 유형: 543. PowerShell 확장 설치 시 "Catalog file '[...].cat' is not found in the contents of the module" 오류 발생
11927정성태6/5/201911687스크립트: 15. PowerShell ISE의 스크립트를 복사 후 PPT/Word에 붙여 넣으면 한글이 깨지는 문제 [1]
11926정성태6/4/201913157오류 유형: 542. Visual Studio - pointer to incomplete class type is not allowed
11925정성태6/4/201911979VC++: 131. Visual C++ - uuid 확장 속성과 __uuidof 확장 연산자파일 다운로드1
11924정성태5/30/201913715Math: 57. C# - 해석학적 방법을 이용한 최소 자승법 [1]파일 다운로드1
11923정성태5/30/201913344Math: 56. C# - 그래프 그리기로 알아보는 경사 하강법의 최소/최댓값 구하기파일 다운로드1
11922정성태5/29/201911418.NET Framework: 840. ML.NET 데이터 정규화파일 다운로드1
11921정성태5/28/201916348Math: 55. C# - 다항식을 위한 최소 자승법(Least Squares Method)파일 다운로드1
11920정성태5/28/20199991.NET Framework: 839. C# - PLplot 색상 제어
11919정성태5/27/201913075Math: 54. C# - 최소 자승법의 1차 함수에 대한 매개변수를 단순 for 문으로 구하는 방법 [1]파일 다운로드1
11918정성태5/25/201914281Math: 53. C# - 행렬식을 이용한 최소 자승법(LSM: Least Square Method)파일 다운로드1
11917정성태5/24/201914333Math: 52. MathNet을 이용한 간단한 통계 정보 처리 - 분산/표준편차파일 다운로드1
11916정성태5/24/201912341Math: 51. MathNET + OxyPlot을 이용한 간단한 통계 정보 처리 - Histogram파일 다운로드1
11915정성태5/24/201914658Linux: 11. 리눅스의 환경 변수 관련 함수 정리 - putenv, setenv, unsetenv
11914정성태5/24/201914369Linux: 10. 윈도우의 GetTickCount와 리눅스의 clock_gettime파일 다운로드1
11913정성태5/23/201911991.NET Framework: 838. C# - 숫자형 타입의 bit(2진) 문자열, 16진수 문자열 구하는 방법파일 다운로드1
11912정성태5/23/201911641VS.NET IDE: 137. Visual Studio 2019 버전 16.1부터 리눅스 C/C++ 프로젝트에 추가된 WSL 지원
11911정성태5/23/201910753VS.NET IDE: 136. Visual Studio 2019 - 리눅스 C/C++ 프로젝트에 인텔리센스가 동작하지 않는 경우
11910정성태5/23/201919384Math: 50. C# - MathNet.Numerics의 Matrix(행렬) 연산 [1]파일 다운로드1
... 61  62  63  64  65  66  67  [68]  69  70  71  72  73  74  75  ...