Show / Hide Table of Contents

DeleteMsroots Method

DeleteMsroots()

Delete any contents stored in the MSROOTS data objects.

C#
public void DeleteMsroots()

Exceptions

Type Condition
InvalidOperationException

There is no KeyCollector loaded, the key provided was not a valid Triple-DES key, or the YubiKey had some other error, such as unreliable connection.

MalformedYubiKeyResponseException

The YubiKey returned malformed data and authentication, either single or double, could not be performed.

OperationCanceledException

The user canceled management key collection.

SecurityException

Mutual authentication was performed and the YubiKey was not authenticated.

Remarks

In order to perform this operation, the management key must be authenticated during this session. If it has not been authenticated, this method will call AuthenticateManagementKey(bool). That is, your application does not need to authenticate the management key separately (i.e., call TryAuthenticateManagementKey or AuthenticateManagementKey), this method will determine if the management key has been authenticated or not, and if not, it will make the call to perform mutual authentication.

The authentication method will collect the management key using the KeyCollector delegate. If no such delegate has been set, it will throw an exception.

The KeyCollector has an option to cancel the operation. That is, the AuthenticateManagementKey method will call the KeyCollector requesting the management key, and it is possible that during the collection operations, the user cancels. The KeyCollector will return to the authentication method noting the cancellation. In that case, it will throw an exception. If you want the authentication to return false on user cancellation, you must call TryAuthenticateManagementKey(bool) directly before calling this method.

In this article
Back to top Generated by DocFX