File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Yubico.YubiKey/src/Yubico/YubiKey/Piv Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,10 @@ private bool TryAuthenticateWithKeyCollector(bool mutualAuthentication)
299
299
/// further documentation on this method.
300
300
/// </para>
301
301
/// </remarks>
302
+ /// <param name="mutualAuthentication">
303
+ /// If <c>true</c> the method will perform mutual authentication, if
304
+ /// <c>false</c>, only the application will authenticate to the YubiKey.
305
+ /// </param>
302
306
/// <exception cref="InvalidOperationException">
303
307
/// There is no <c>KeyCollector</c> loaded, the key provided was not a
304
308
/// valid Triple-DES or AES key, or the YubiKey had some other error, such as
@@ -320,7 +324,7 @@ public void AuthenticateManagementKey(bool mutualAuthentication = true)
320
324
Logger . LogInformation (
321
325
$ "Authenticate the management key: { ( mutualAuthentication ? "mutual" : "single" ) } auth.") ;
322
326
323
- if ( TryAuthenticateManagementKey ( mutualAuthentication ) == false )
327
+ if ( ! TryAuthenticateManagementKey ( mutualAuthentication ) )
324
328
{
325
329
throw new OperationCanceledException (
326
330
string . Format (
@@ -1009,11 +1013,12 @@ private bool TryAuthenticateManagementKey(
1009
1013
}
1010
1014
1011
1015
ManagementKeyAuthenticated = true ;
1016
+ return true ;
1012
1017
}
1013
1018
1014
1019
Logger . LogInformation ( $ "Failed to authenticate management key. Message: { completeResponse . StatusMessage } ") ;
1015
1020
1016
- return ManagementKeyAuthenticated ;
1021
+ return false ;
1017
1022
}
1018
1023
1019
1024
private void RefreshManagementKeyAlgorithm ( ) => ManagementKeyAlgorithm = GetManagementKeyAlgorithm ( ) ;
You can’t perform that action at this time.
0 commit comments