我在新安装的12.04 LTS上使用以下命令集。
sudo apt-get install -qq python-software-properties
sudo add-apt-repository -y ppa:v-kukol/mono-testing
sudo apt-get update -qq > /dev/null
sudo apt-get install -qq mono-complete mono-gmcs > /dev/null
mozroots --import --sync
mozroots
命令失败,但出现以下错误消息。
Mozilla Roots Importer - version 3.0.12.0
Download and import trusted root certificates from Mozilla's MXR.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.
Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'...
Importing certificates into user store...
Error: System.Security.Cryptography.CryptographicException: Unsupported hash algorithm: 1.2.840.10045.4.3.3
at Mono.Security.Cryptography.PKCS1.HashNameFromOid (System.String oid) [0x00000] in <filename unknown>:0
at Mono.Security.Cryptography.PKCS1.CreateFromOid (System.String oid) [0x00000] in <filename unknown>:0
at Mono.Security.X509.X509Certificate.get_Hash () [0x00000] in <filename unknown>:0
at Mono.Security.X509.X509CertificateCollection.IndexOf (Mono.Security.X509.X509Certificate value) [0x00000] in <filename unknown>:0
at Mono.Security.X509.X509CertificateCollection.Contains (Mono.Security.X509.X509Certificate value) [0x00000] in <filename unknown>:0
at Mono.Tools.MozRoots.Process () [0x00000] in <filename unknown>:0
at Mono.Tools.MozRoots.Main (System.String[] args) [0x00000] in <filename unknown>:0
当我使用Mono 2.10.8.1(默认版本为12.04)时,我没有遇到此问题。但是,我现在需要Mono的一些新功能。
如何解决此错误?
答案 0 :(得分:2)
这是最近修复的。获得修复的最简单方法是更新到Mono 3.2.x.另一种方法是使用较旧的Mono(例如2.10)下载证书。