aboutsummaryrefslogtreecommitdiff
path: root/include/NitrokeyManager.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-02-23 16:03:16 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-02-23 16:03:16 +0100
commitd5486ba77235a874245fbee07a75cea89fa59ea2 (patch)
tree7f2df53da4c018fbfa6ec57809bcd2fcefaf0624 /include/NitrokeyManager.h
parent102ee60cd8ee9e5ce263de1d4a775acf29f37fbc (diff)
parenta262472826830ea0a98a4da2fa8f665d359b8789 (diff)
downloadlibnitrokey-d5486ba77235a874245fbee07a75cea89fa59ea2.tar.gz
libnitrokey-d5486ba77235a874245fbee07a75cea89fa59ea2.tar.bz2
Merge branch 'wip-support_storage_v0.51'
Support for functionality added in v0.49/v0.51
Diffstat (limited to 'include/NitrokeyManager.h')
-rw-r--r--include/NitrokeyManager.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/NitrokeyManager.h b/include/NitrokeyManager.h
index 9a1686c..0db0856 100644
--- a/include/NitrokeyManager.h
+++ b/include/NitrokeyManager.h
@@ -126,10 +126,38 @@ char * strndup(const char* str, size_t maxlen);
void unlock_hidden_volume(const char *hidden_volume_password);
void lock_hidden_volume();
+ /**
+ * Sets unencrypted volume read-only.
+ * Works until v0.48 (incl. v0.50), where User PIN was sufficient
+ * Does nothing otherwise.
+ * @param user_pin User PIN
+ */
void set_unencrypted_read_only(const char *user_pin);
+ /**
+ * Sets unencrypted volume read-only.
+ * Works from v0.49 (except v0.50) accepts Admin PIN
+ * Does nothing otherwise.
+ * @param admin_pin Admin PIN
+ */
+ void set_unencrypted_read_only_admin(const char *admin_pin);
+
+ /**
+ * Sets unencrypted volume read-write.
+ * Works until v0.48 (incl. v0.50), where User PIN was sufficient
+ * Does nothing otherwise.
+ * @param user_pin User PIN
+ */
void set_unencrypted_read_write(const char *user_pin);
+ /**
+ * Sets unencrypted volume read-write.
+ * Works from v0.49 (except v0.50) accepts Admin PIN
+ * Does nothing otherwise.
+ * @param admin_pin Admin PIN
+ */
+ void set_unencrypted_read_write_admin(const char *admin_pin);
+
void export_firmware(const char *admin_pin);
void enable_firmware_update(const char *firmware_pin);
@@ -202,6 +230,31 @@ char * strndup(const char* str, size_t maxlen);
void set_loglevel(Loglevel loglevel);
void set_loglevel(int loglevel);
+
+ /**
+ * Sets encrypted volume read-only.
+ * Supported from future versions of Storage.
+ * @param admin_pin Admin PIN
+ */
+ void set_encrypted_volume_read_only(const char *admin_pin);
+
+ /**
+ * Sets encrypted volume read-write.
+ * Supported from future versions of Storage.
+ * @param admin_pin Admin PIN
+ */
+ void set_encrypted_volume_read_write(const char *admin_pin);
+
+ int get_major_firmware_version();
+
+ bool is_smartcard_in_use();
+
+ /**
+ * Function to determine unencrypted volume PIN type
+ * @param minor_firmware_version
+ * @return Returns true, if set unencrypted volume ro/rw pin type is User, false otherwise.
+ */
+ bool set_unencrypted_volume_rorw_pin_type_user();
};
}