@@ -140,15 +140,6 @@ public X509Certificate2 Certificate
140140 }
141141 }
142142
143- /// <summary>
144- /// Finds a certificate in a store.
145- /// </summary>
146- [ Obsolete ( "Use FindAsync instead" ) ]
147- public Task < X509Certificate2 > Find ( string applicationUri = null )
148- {
149- return FindAsync ( applicationUri ) ;
150- }
151-
152143 /// <summary>
153144 /// Finds a certificate in a store.
154145 /// </summary>
@@ -159,17 +150,6 @@ public Task<X509Certificate2> FindAsync(
159150 return FindAsync ( false , applicationUri , ct ) ;
160151 }
161152
162- /// <summary>
163- /// Loads the private key for the certificate with an optional password.
164- /// </summary>
165- [ Obsolete ( "Use LoadPrivateKeyAsync instead" ) ]
166- public Task < X509Certificate2 > LoadPrivateKey ( string password , string applicationUri = null )
167- {
168- return LoadPrivateKeyExAsync (
169- password != null ? new CertificatePasswordProvider ( password ) : null ,
170- applicationUri ) ;
171- }
172-
173153 /// <summary>
174154 /// Loads the private key for the certificate with an optional password.
175155 /// </summary>
@@ -184,17 +164,6 @@ public Task<X509Certificate2> LoadPrivateKeyAsync(
184164 ct ) ;
185165 }
186166
187- /// <summary>
188- /// Loads the private key for the certificate with an optional password provider.
189- /// </summary>
190- [ Obsolete ( "Use LoadPrivateKeyExAsync instead" ) ]
191- public Task < X509Certificate2 > LoadPrivateKeyEx (
192- ICertificatePasswordProvider passwordProvider ,
193- string applicationUri = null )
194- {
195- return LoadPrivateKeyExAsync ( passwordProvider , applicationUri ) ;
196- }
197-
198167 /// <summary>
199168 /// Loads the private key for the certificate with an optional password provider.
200169 /// </summary>
@@ -244,20 +213,6 @@ public async Task<X509Certificate2> LoadPrivateKeyExAsync(
244213 return await FindAsync ( true , ct : ct ) . ConfigureAwait ( false ) ;
245214 }
246215
247- /// <summary>
248- /// Finds a certificate in a store.
249- /// </summary>
250- /// <remarks>The certificate type is used to match the signature and public key type.</remarks>
251- /// <param name="needPrivateKey">if set to <c>true</c> the returned certificate must contain the private key.</param>
252- /// <param name="applicationUri">the application uri in the extensions of the certificate.</param>
253- /// <returns>An instance of the <see cref="X509Certificate2"/> that is embedded by this instance or find it in
254- /// the selected store pointed out by the <see cref="StorePath"/> using selected <see cref="SubjectName"/> or if specified applicationUri.</returns>
255- [ Obsolete ( "Use FindAsync instead" ) ]
256- public Task < X509Certificate2 > Find ( bool needPrivateKey , string applicationUri = null )
257- {
258- return FindAsync ( needPrivateKey , applicationUri ) ;
259- }
260-
261216 /// <summary>
262217 /// Finds a certificate in a store.
263218 /// </summary>
@@ -835,13 +790,6 @@ public void Close()
835790 /// <inheritdoc/>
836791 public bool NoPrivateKeys => true ;
837792
838- /// <inheritdoc/>
839- [ Obsolete ( "Use EnumerateAsync instead" ) ]
840- public Task < X509Certificate2Collection > Enumerate ( )
841- {
842- return EnumerateAsync ( ) ;
843- }
844-
845793 /// <inheritdoc/>
846794 public async Task < X509Certificate2Collection > EnumerateAsync ( CancellationToken ct = default )
847795 {
@@ -896,13 +844,6 @@ public async Task AddAsync(
896844 Add ( new CertificateIdentifier ( certificate ) ) ;
897845 }
898846
899- /// <inheritdoc/>
900- [ Obsolete ( "Use DeleteAsync instead." ) ]
901- public Task < bool > Delete ( string thumbprint )
902- {
903- return DeleteAsync ( thumbprint ) ;
904- }
905-
906847 /// <inheritdoc/>
907848 public async Task < bool > DeleteAsync ( string thumbprint , CancellationToken ct = default )
908849 {
@@ -926,13 +867,6 @@ public async Task<bool> DeleteAsync(string thumbprint, CancellationToken ct = de
926867 return false ;
927868 }
928869
929- /// <inheritdoc/>
930- [ Obsolete ( "Use FindByThumbprintAsync instead." ) ]
931- public Task < X509Certificate2Collection > FindByThumbprint ( string thumbprint )
932- {
933- return FindByThumbprintAsync ( thumbprint ) ;
934- }
935-
936870 /// <inheritdoc/>
937871 public async Task < X509Certificate2Collection > FindByThumbprintAsync (
938872 string thumbprint ,
@@ -960,34 +894,6 @@ public async Task<X509Certificate2Collection> FindByThumbprintAsync(
960894 /// <inheritdoc/>
961895 public bool SupportsLoadPrivateKey => false ;
962896
963- /// <inheritdoc/>
964- [ Obsolete ( "Use LoadPrivateKeyAsync instead." ) ]
965- public Task < X509Certificate2 > LoadPrivateKey (
966- string thumbprint ,
967- string subjectName ,
968- string password )
969- {
970- return Task . FromResult < X509Certificate2 > ( null ) ;
971- }
972-
973- /// <inheritdoc/>
974- /// <remarks>The LoadPrivateKey special handling is not necessary in this store.</remarks>
975- [ Obsolete ( "Use LoadPrivateKeyAsync instead." ) ]
976- public Task < X509Certificate2 > LoadPrivateKey (
977- string thumbprint ,
978- string subjectName ,
979- string applicationUri ,
980- NodeId certificateType ,
981- string password )
982- {
983- return LoadPrivateKeyAsync (
984- thumbprint ,
985- subjectName ,
986- applicationUri ,
987- certificateType ,
988- password ) ;
989- }
990-
991897 /// <inheritdoc/>
992898 public Task < X509Certificate2 > LoadPrivateKeyAsync (
993899 string thumbprint ,
@@ -1003,13 +909,6 @@ public Task<X509Certificate2> LoadPrivateKeyAsync(
1003909 /// <inheritdoc/>
1004910 public bool SupportsCRLs => false ;
1005911
1006- /// <inheritdoc/>
1007- [ Obsolete ( "Use IsRevokedAsync instead." ) ]
1008- public Task < StatusCode > IsRevoked ( X509Certificate2 issuer , X509Certificate2 certificate )
1009- {
1010- return IsRevokedAsync ( issuer , certificate ) ;
1011- }
1012-
1013912 /// <inheritdoc/>
1014913 public Task < StatusCode > IsRevokedAsync (
1015914 X509Certificate2 issuer ,
@@ -1019,28 +918,12 @@ public Task<StatusCode> IsRevokedAsync(
1019918 return Task . FromResult ( ( StatusCode ) StatusCodes . BadNotSupported ) ;
1020919 }
1021920
1022- /// <inheritdoc/>
1023- [ Obsolete ( "Use EnumerateCRLsAsync instead." ) ]
1024- public Task < X509CRLCollection > EnumerateCRLs ( )
1025- {
1026- return EnumerateCRLsAsync ( ) ;
1027- }
1028-
1029921 /// <inheritdoc/>
1030922 public Task < X509CRLCollection > EnumerateCRLsAsync ( CancellationToken ct = default )
1031923 {
1032924 return Task . FromResult ( new X509CRLCollection ( ) ) ;
1033925 }
1034926
1035- /// <inheritdoc/>
1036- [ Obsolete ( "Use EnumerateCRLsAsync instead." ) ]
1037- public Task < X509CRLCollection > EnumerateCRLs (
1038- X509Certificate2 issuer ,
1039- bool validateUpdateTime = true )
1040- {
1041- return EnumerateCRLsAsync ( issuer , validateUpdateTime ) ;
1042- }
1043-
1044927 /// <inheritdoc/>
1045928 public Task < X509CRLCollection > EnumerateCRLsAsync (
1046929 X509Certificate2 issuer ,
@@ -1050,39 +933,18 @@ public Task<X509CRLCollection> EnumerateCRLsAsync(
1050933 return Task . FromResult ( new X509CRLCollection ( ) ) ;
1051934 }
1052935
1053- /// <inheritdoc/>
1054- [ Obsolete ( "Use AddCRLAsync instead" ) ]
1055- public Task AddCRL ( X509CRL crl )
1056- {
1057- throw new ServiceResultException ( StatusCodes . BadNotSupported ) ;
1058- }
1059-
1060936 /// <inheritdoc/>
1061937 public Task AddCRLAsync ( X509CRL crl , CancellationToken ct = default )
1062938 {
1063939 throw new ServiceResultException ( StatusCodes . BadNotSupported ) ;
1064940 }
1065941
1066- /// <inheritdoc/>
1067- [ Obsolete ( "Use DeleteCRLAsync instead." ) ]
1068- public Task < bool > DeleteCRL ( X509CRL crl )
1069- {
1070- return DeleteCRLAsync ( crl ) ;
1071- }
1072-
1073942 /// <inheritdoc/>
1074943 public Task < bool > DeleteCRLAsync ( X509CRL crl , CancellationToken ct = default )
1075944 {
1076945 throw new ServiceResultException ( StatusCodes . BadNotSupported ) ;
1077946 }
1078947
1079- /// <inheritdoc/>
1080- [ Obsolete ( "Use AddRejectedAsync instead." ) ]
1081- public Task AddRejected ( X509Certificate2Collection certificates , int maxCertificates )
1082- {
1083- return Task . CompletedTask ;
1084- }
1085-
1086948 /// <inheritdoc/>
1087949 public Task AddRejectedAsync (
1088950 X509Certificate2Collection certificates ,
0 commit comments