-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBackgroundCopyJobClientCertificate.cs
98 lines (76 loc) · 2.96 KB
/
BackgroundCopyJobClientCertificate.cs
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
//
// @(#) BackgroundCopyJobClientCertificate.cs
//
// Project: usis.Net.Bits
// System: Microsoft Visual Studio 2022
// Author: Udo Schäfer
//
// Copyright (c) 2018-2024 usis GmbH. All rights reserved.
namespace usis.Net.Bits
{
// ----------------------------------------
// BackgroundCopyJobClientCertificate class
// ----------------------------------------
/// <summary>
/// Provides properties that specify the client certificate for a job.
/// </summary>
/// <remarks>
/// Initializes a new instance of the <see cref="BackgroundCopyJobClientCertificate"/> class.
/// </remarks>
/// <param name="location">The store location.</param>
/// <param name="storeName">vThe name of the store.</param>
/// <param name="thumbprint">The SHA1 hash that identifies the certificate.</param>
/// <param name="subjectName">The simple subject name of the certificate.</param>
public sealed class BackgroundCopyJobClientCertificate(
BackgroundCopyCertificateStoreLocation location,
string storeName,
byte[] thumbprint,
string subjectName)
{
#region properties
// ----------------------
// StoreLocation property
// ----------------------
/// <summary>
/// Gets the store location.
/// </summary>
/// <value>The store location.</value>
public BackgroundCopyCertificateStoreLocation StoreLocation { get; } = location;
// ------------------
// StoreName property
// ------------------
/// <summary>
/// Gets the name of the store.
/// </summary>
/// <value>The name of the store.</value>
public string StoreName { get; } = storeName;
// -------------------
// Thumbprint property
// -------------------
/// <summary>
/// Gets the SHA1 hash that identifies the certificate.
/// </summary>
/// <value>The SHA1 hash that identifies the certificate.</value>
internal byte[] Thumbprint { get; } = thumbprint;
// --------------------
// SubjectName property
// --------------------
/// <summary>
/// Gets the simple subject name of the certificate.
/// </summary>
/// <value>The simple subject name of the certificate.</value>
public string SubjectName { get; } = subjectName;
#endregion
#region methods
// --------------------
// GetThumbprint method
// --------------------
/// <summary>
/// Gets the SHA1 hash that identifies the certificate.
/// </summary>
/// <returns>The SHA1 hash that identifies the certificate.</returns>
public byte[] GetThumbprint() => Thumbprint;
#endregion methods
}
}
// eof "BackgroundCopyJobClientCertificate.cs"