DeleteMsroots Method
DeleteMsroots()
Delete any contents stored in the MSROOTS data objects.
public void DeleteMsroots()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | There is no |
MalformedYubiKeyResponseException | The YubiKey returned malformed data and authentication, either single or double, could not be performed. |
System.OperationCanceledException | The user canceled management key collection. |
System.Security.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(Boolean). 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(Boolean) directly
before calling this method.