[UWP]如何创建具有长日期的自定义证书,例如10年 [英] [UWP]How to create a Custom Certificate with a long date, for example 10 years

查看:260
本文介绍了[UWP]如何创建具有长日期的自定义证书,例如10年的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建自定义证书,我想使用.appinstaller和我的自定义证书部署UWP。

I am trying to create a custom certificate, I want to deploy UWP using .appinstaller, and my custom certificate.

New-SelfSignedCertificate -Type CodeSigningCert -Subject" CN = Tony Sistemas,O = Contoso Corporation,C = US" -KeyUsage DigitalSignature -FriendlyName" Tony Sistemas" -CertStoreLocation" Cert:\ LocalMachine \ Myy" -TextExtension
" 2.5.29.37 = {text} 1.3.6.1.5.5.7.3.3"

$ pwd = ConvertTo-SecureString -String jumento2018 -Force -AsPlainText


Export-PfxCertificate -cert" Cert:\ LocalMachine \ My\CB8B878B46A73B32D49898DF90DDB7419FCC5B2A" -FilePath C:\ temp \cert \ uwp.pfx -Password $ pwd

推荐答案

嗨Tony Neri,

Hi Tony Henrique,

根据您的错误信息,它应该与证书相关,并且作为文档  New-SelfSignedCertificate ,您可以尝试使用
< strong> -NotAfter 参数指定日期和时间 证书到期。但是,一般来说,自签x509证书生效日期为一年,如果您需要大约10年的时间,可以自己购买。

According to your error info, it should be relative to the certificate and as the document New-SelfSignedCertificate, you can try to use the -NotAfter parameter to specify the date and time that the certificate expires. But, generally, the self- sign x509 certificate effective date is one year, if you need more time about 10 years, you can buy it by yourself.

祝你好运,

Breeze


这篇关于[UWP]如何创建具有长日期的自定义证书,例如10年的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆