Skip to content

Commit fbf6333

Browse files
bartonjsRon Petrusha
andcommitted
Document SafeEvpPKeyHandle (#2870)
* Document SafeEvpPKeyHandle * Apply suggestions from code review Co-Authored-By: Ron Petrusha <[email protected]>
1 parent 19f8c08 commit fbf6333

File tree

1 file changed

+37
-15
lines changed

1 file changed

+37
-15
lines changed

xml/System.Security.Cryptography/SafeEvpPKeyHandle.xml

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,16 @@
1717
</Base>
1818
<Interfaces />
1919
<Docs>
20-
<summary>To be added.</summary>
21-
<remarks>To be added.</remarks>
20+
<summary>Represents the <see langword="EVP_PKEY*"/> pointer type from OpenSSL.</summary>
21+
<remarks>
22+
<format type="text/markdown"><![CDATA[
23+
24+
## Remarks
25+
26+
Before using <xref:System.Security.Cryptography.SafeEvpPKeyHandle> to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version. The version of OpenSSL that the runtime is calling can be determined by <xref:System.Security.Cryptography.SafeEvpPKeyHandle.OpenSslVersion>.
27+
28+
]]></format>
29+
</remarks>
2230
</Docs>
2331
<Members>
2432
<Member MemberName=".ctor">
@@ -41,9 +49,9 @@
4149
<Parameter Name="ownsHandle" Type="System.Boolean" />
4250
</Parameters>
4351
<Docs>
44-
<param name="handle">To be added.</param>
45-
<param name="ownsHandle">To be added.</param>
46-
<summary>To be added.</summary>
52+
<param name="handle">The handle value to represent.</param>
53+
<param name="ownsHandle"><see langword="true" /> to reliably let <see cref="T:System.Security.Cryptography.SafeEvpPKeyHandle" /> release the handle during the finalization phase; otherwise, <see langword="false" /> (not recommended).</param>
54+
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.SafeEvpPKeyHandle" /> class with the specified handle value.</summary>
4755
<remarks>To be added.</remarks>
4856
</Docs>
4957
</Member>
@@ -67,9 +75,11 @@
6775
</ReturnValue>
6876
<Parameters />
6977
<Docs>
70-
<summary>To be added.</summary>
71-
<returns>To be added.</returns>
78+
<summary>Creates another instance of this type which has an independent lifetime but tracks the same resource.</summary>
79+
<returns>Another instance of this type which has an independent lifetime but tracks the same resource.</returns>
7280
<remarks>To be added.</remarks>
81+
<exception cref="T:System.InvalidOperationException">This handle is invalid.</exception>
82+
<altmember cref="P:System.Security.Cryptography.SafeEvpPKeyHandle.IsInvalid" />
7383
</Docs>
7484
</Member>
7585
<Member MemberName="IsInvalid">
@@ -91,8 +101,8 @@
91101
<ReturnType>System.Boolean</ReturnType>
92102
</ReturnValue>
93103
<Docs>
94-
<summary>To be added.</summary>
95-
<value>To be added.</value>
104+
<summary>Gets a value indicating whether the handle value is invalid.</summary>
105+
<value><see langword="true" /> if the handle value is invalid; otherwise, <see langword="false" />.</value>
96106
<remarks>To be added.</remarks>
97107
</Docs>
98108
</Member>
@@ -112,9 +122,21 @@
112122
<ReturnType>System.Int64</ReturnType>
113123
</ReturnValue>
114124
<Docs>
115-
<summary>To be added.</summary>
116-
<value>To be added.</value>
117-
<remarks>To be added.</remarks>
125+
<summary>Gets a value representing the version number as reported by the loaded version of OpenSSL.</summary>
126+
<value>A value representing the version number as reported by the loaded version of OpenSSL.</value>
127+
<remarks>
128+
<format type="text/markdown"><![CDATA[
129+
130+
## Remarks
131+
132+
Before using <xref:System.Security.Cryptography.SafeEvpPKeyHandle> to perform interop with OpenSSL a caller must ensure that the version of OpenSSL they are calling is the same as the version the .NET runtime is calling, and not a side-by-side version.
133+
134+
For OpenSSL 1.1.0 and newer, this value is reported from the `OpenSSL_version_num()` function. When an older version of OpenSSL is in use, this value is reported from the `SSLeay()` function.
135+
136+
Callers are encouraged to only perform an equality check with this value.
137+
138+
]]></format>
139+
</remarks>
118140
</Docs>
119141
</Member>
120142
<Member MemberName="ReleaseHandle">
@@ -137,10 +159,10 @@
137159
</ReturnValue>
138160
<Parameters />
139161
<Docs>
140-
<summary>To be added.</summary>
141-
<returns>To be added.</returns>
162+
<summary>Executes the code required to free the handle.</summary>
163+
<returns><see langword="true"/> in all cases.</returns>
142164
<remarks>To be added.</remarks>
143165
</Docs>
144166
</Member>
145167
</Members>
146-
</Type>
168+
</Type>

0 commit comments

Comments
 (0)