2
我一直試圖在Xamarin.iOS上使用Google的服務帳戶。 System.Security.Cryptography.X509Certificates不支持PCL項目,所以我需要一種不同的方式(如Bouncy Castle或PCLCrypto)將X509Certificate加載到項目中。基本上,作爲谷歌的文檔中,提取證書的方法是如下:如何將X.509 v.3谷歌證書添加到C中的Bouncy Castle項目中#
var certificate = new X509Certificate2(@"key.p12", "notasecret", X509KeyStorageFlags.Exportable);
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { PlusService.Scope.PlusMe }
}.FromCertificate(certificate));
的問題是,什麼是充氣城堡加載證書(代碼的第一行)的替代方式?