blob: 30ca194b8e219c648abc1397083548b4af08f0f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// **********************************************************************
//
// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
namespace IceSSL
{
using System;
using System.Diagnostics;
using System.Security.Cryptography.X509Certificates;
public sealed class Util
{
public static X509Certificate2 createCertificate(string certPEM)
{
char[] chars = certPEM.ToCharArray();
byte[] bytes = new byte[chars.Length];
for(int i = 0; i < chars.Length; ++i)
{
bytes[i] = (byte)chars[i];
}
return new X509Certificate2(bytes);
}
}
}
|