게시자 인증서가 기본적으로 '신뢰할 수 있는 게시자'에 설치되도록 하려면 어떻게 해야 합니까?

게시자 인증서가 기본적으로 '신뢰할 수 있는 게시자'에 설치되도록 하려면 어떻게 해야 합니까?

PowerShell에서 인증서를 만듭니다. 첫 번째는 루트이고 두 번째는 게시자를 원합니다.

인증서를 '*.pfx' 파일로 내보내고 그 파일에서 설치할 때 루트는 루트 폴더에 저장되고 양호하지만 두 번째는 '신뢰할 수 있는 게시자'가 아닌 공개 폴더로 이동합니다.

두 번째 항목이 기본적으로 '신뢰할 수 있는 게시자'에 설치되도록 하려면 어떻게 해야 합니까?

가능하다면.

답변1

Powershell을 사용하여 간단한 기능을 만들었습니다.

$in_cert = "C:\Users\Marian\Desktop\Pfx Certificate.pfx";
$password = Read-Host -AsSecureString;

# Read the pfx certificate data:
$pfx = (Get-PfxData -FilePath $in_cert -Password $password -ErrorAction Stop);

# Get the root and publisher certificate:
$root = $pfx.OtherCertificates[0];
$publisher = $pfx.EndEntityCertificates[0];

# Add the root:
$rootStore = Get-Item "Cert:\CurrentUser\Root";
$rootStore.Open('ReadWrite');
$rootStore.add($root);
$rootStore.close();

# Add the publisher:
$rootStore = Get-Item "Cert:\CurrentUser\TrustedPublisher";
$rootStore.Open('ReadWrite');
$rootStore.add($publisher);
$rootStore.close();

Pause;

"루트 경고"를 건너뛰려면 "Cert:\LocalMachine" 및 "관리자 권한으로 실행"을 사용하십시오.

관련 정보