File: PrivateKeySelectionCallback.xml

package info (click to toggle)
monodoc 1.9-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 98,436 kB
  • ctags: 5,261
  • sloc: xml: 1,506,218; cs: 40,827; sh: 3,647; perl: 554; makefile: 476
file content (48 lines) | stat: -rw-r--r-- 2,738 bytes parent folder | download | duplicates (7)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<Type Name="PrivateKeySelectionCallback" FullName="Mono.Security.Protocol.Tls.PrivateKeySelectionCallback">
  <TypeSignature Language="C#" Maintainer="auto" Value="public delegate System.Security.Cryptography.AsymmetricAlgorithm PrivateKeySelectionCallback(X509Certificate certificate, string targetHost);" />
  <AssemblyInfo>
    <AssemblyName>Mono.Security</AssemblyName>
    <AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 79 15 99 77 D2 D0 3A 8E 6B EA 7A 2E 74 E8 D1 AF CC 93 E8 85 19 74 95 2B B4 80 A1 2C 91 34 47 4D 04 06 24 47 C3 7E 0E 68 C0 80 53 6F CF 3C 3F BE 2F F9 C9 79 CE 99 84 75 E5 06 E8 CE 82 DD 5B 0F 35 0D C1 0E 93 BF 2E EE CF 87 4B 24 77 0C 50 81 DB EA 74 47 FD DA FA 27 7B 22 DE 47 D6 FF EA 44 96 74 A4 F9 FC CF 84 D1 50 69 08 93 80 28 4D BD D3 5F 46 CD FF 12 A1 BD 78 E4 EF 00 65 D0 16 DF]</AssemblyPublicKey>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Delegate</BaseTypeName>
  </Base>
  <Docs>
    <param name="certificate">To be added.</param>
    <param name="targetHost">To be added.</param>
    <summary>Type of the method that can find the private key associated with a specific X.509 certificate and a host name.</summary>
    <value>To be added.</value>
    <remarks>
      <para>First we assign a method to select a private key.</para>
      <example>
        <code lang="C#">
	// ... initialize the NetworkStream, get the X.509 certificate ...
	using (SslServerStream s = new SslServerStream (ns, certificate, false, false)) { 
		s.PrivateKeyCertSelectionDelegate += new PrivateKeySelectionCallback (GetPrivateKey); 
	} 
  </code>
      </example>
      <para>The method has the certificate and the name of the target host to find the appropriate private key.</para>
      <example>
        <code lang="C#">
          private static AsymmetricAlgorithm GetPrivateKey (X509Certificate certificate, string targetHost) 
          { 
               PrivateKey key = PrivateKey.CreateFromFile (targetHost + ".pvk"); 
               return key.RSA; 
          } 
  </code>
      </example>
    </remarks>
  </Docs>
  <Members />
  <ReturnValue>
    <ReturnType>System.Security.Cryptography.AsymmetricAlgorithm</ReturnType>
  </ReturnValue>
  <Parameters>
    <Parameter Name="certificate" Type="System.Security.Cryptography.X509Certificates.X509Certificate" />
    <Parameter Name="targetHost" Type="System.String" />
  </Parameters>
</Type>