我在新安装的 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 的一些新功能来用于我的应用程序。
我该如何解决这个错误?
答案1
感谢波普,我们已经有了答案:
最近已修复此问题。修复此问题最简单的方法是更新到 Mono 3.2.x。另一种方法是使用较旧的 Mono(例如 2.10)下载证书。