public string WithVolumeInfo(ChangeVolumeAttributesParams volumeParams) { return($"{WithTokenId(Resources.VolumeAccessModeChangeSuccess)} : " + $"{volumeParams.VolumeId} " + $"{_volumeAttributesStore.GetAccessModeDescription(volumeParams.AccessMode)} " + $"{_volumeAttributesStore.GetPermanentStateDescription(volumeParams.Permanent)}"); }
public static void Change(IRutokenSlot slot, ChangeVolumeAttributesParams volumeAttributes) { try { slot.ChangeVolumeAttributes( volumeAttributes.VolumeOwner, volumeAttributes.OwnerPin, (uint)volumeAttributes.VolumeId, volumeAttributes.AccessMode, volumeAttributes.Permanent); } catch (Pkcs11Exception ex) when(ex.RV == CKR.CKR_PIN_INCORRECT) { throw new CKRException(ex.RV, Resources.IncorrectVolumeOwnerPin); } }