Security policy group provides policies for security control.
More...
Security policy group provides policies for security control.
Security policy group.
Required Header
#include <mdm.h>
Overview
This group provides APIs to control security related functionality on the device such as certificate installation and wipe.
Certificate type.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- See also
- mdm_install_certificate, mdm_get_installed_certificate_names
Enumerator |
---|
MDM_VPN_CERTIFICATE |
user certificate in vpn certificate store.
|
MDM_WIFI_CERTIFICATE |
user certificate in Wi-Fi certificate store.
|
MDM_EMAIL_CERTIFICATE |
user certificate in email certificate store.
|
MDM_SYSTEM_CERTIFICATE |
ca certificate.
|
Definition at line 59 of file security.h.
Device wipe type.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- See also
- mdm_wipe_data
Enumerator |
---|
MDM_WIPE_INTERNAL_MEMORY |
Wipe internal memory.
|
MDM_WIPE_EXTERNAL_MEMORY |
Wipe external memory.
|
Definition at line 39 of file security.h.
mdm_status_t knox_mdm_get_allow_lockscreen_type_change |
( |
void |
| ) |
|
API to check if changing the lock screen type is allowed.
- Since (Knox_wearable):
- 2.3.0
- Since (Tizen):
- 4.0.0.0
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to check if the end user is allowed to change the lock screen type, and take the appropriate action based on the enterprise policy.
- Returns
- mdm_status_t : The current prevention status.
- Return values
-
- See also
- knox_mdm_set_allow_lockscreen_type_change
API to allow or restrict changes to the lock screen type.
- Since (Knox_wearable):
- 2.3.0
- Since (Tizen):
- 4.0.0.0
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- The admin can use this API to allow or restrict the end user from changing the lock screen type. Restricting changes via this API prevents the user from modifying the lock screen type using the UI settings on the device.
- Parameters
-
[in] | status | MDM_RESTRICTED — The end user is restricted from changing the lock screen type on the device.
MDM_ALLOWED — The end user is allowed to change the lock screen type on the device. |
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
- See also
- knox_mdm_get_allow_lockscreen_type_change
API to remove all installed certificates from the device.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to remove all installed certificates in a specified store from a device on behalf of the end user, without needing any user interaction.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Parameters
-
[in] | type | Type of certificate store to remove all certificates from. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS upon successful removal of all installed certificates from a device, or an error code from the values listed below upon failure.
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_certificate
API returns a list of certificate names currently installed on a device. The names included in the list will all be under the same specified certificate type.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to get a list of certificate names currently installed on a device. A certificate type must be provided.
NOTE — You can combine different types using the OR operator e.g. MDM_WIFI_CERTIFICATE|MDM_EMAIL_CERTIFICATE
if (lp_data) {
GList *lp_list = (GList *)lp_data->
data;
if (lp_list) {
lp_list = g_list_first(lp_list);
while (lp_list && lp_list->data) {
printf(Name : "%s", lp_list->data);
lp_list = g_list_next(lp_list);
}
}
} else {
}
- Parameters
-
[in] | type | Certificate type for which certificate list need to be obtained. |
- Returns
- mdm_data_t * on success, NULL on error
- See also
- mdm_get_installed_certificates
API returns a list of user certificates currently installed on a device.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to get a list of certificates currently installed on a device under a specified store. The API returns the following information: Certificate type, cast to security_information_fields to be read in detail.
if (lp_data) {
GList *lp_list = (GList *)lp_data->
data;
if (lp_list) {
lp_list = g_list_first(lp_list);
while (lp_list && lp_list->data) {
if (lp_certi_data) {
printf("[Certi data: %d,%d,%s,%s,%s,%s,%s,%s,%s,%s \
(Issuer data: %s,%s,%s,%s,%s,%s,%s) \
(Subject data: %s,%s,%s,%s,%s,%s,%s)]",
lp_certi_data->filePath,
}
lp_list = g_list_next(lp_list);
}
}
} else {
}
- Parameters
-
[in] | type | Type of certificate repository to get the certificates from.
NOTE — You can combine different types using the OR operator. |
- Returns
- mdm_data_t * on success, NULL on error
- See also
- mdm_get_installed_certificate_names
mdm_status_t mdm_get_internal_storage_encryption_status |
( |
void |
| ) |
|
API checks the status of internal storage encryption on device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can check whether internal storage is encrypted or not. It returns the value set by mdm_set_internal_storage_encryption.
- Returns
- mdm_status_t : The current prevention status.
- Return values
-
- See also
- mdm_set_internal_storage_encryption
API to get the current status of lock screen. Checks if lock screen is locked, or unlocked.
- Since (Tizen):
- 3.0.0.1
- Since (Knox_wearable):
- 2.2.0
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to check if the screen is locked or unlocked.
- Returns
- mdm_status_t : Current lock status, one of MDM_TRUE or MDM_FALSE. In case of error return MDM_STATUS_ERROR.
- See also
- mdm_lock_now
API to install certificates on a device.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to install certificates on behalf of the end user, without needing any user interaction.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Parameters
-
[in] | type | Set key store to install certificate in. You can pass more then one store using OR. Certificate installation in system store is not supported due to system limitations. |
[in] | file_path | Path of certificate file to install |
[in] | name | Name of certificate in a store |
[in] | password | Password, if certificate/container is encrypted (i.e. .p12). For instance in case of .pem .crt and .cer files password is ignored. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS upon successful installation of certificates, or an error code from the values listed below upon failure.
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_remove_certificate
API to immediately lock the device screen.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can lock the device immediately, as if the lock screen time-out duration has expired at this point. Current support lock types are: pattern, pin, password.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_is_device_locked, mdm_get_lock_state
API to power off the device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can switch-off device without user interaction.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_reboot
API to reboot the device immediately.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can silently reboot device.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_power_off_device
API to remove certificate authority (CA) or user certificates on a device.
- Since (Knox_wearable):
- 2.2.0
- Since (Tizen):
- 3.0.0.1
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Use this API to uninstall certificates on behalf of the end user, without needing any user interaction.
if (lp_data) {
GList *lp_list = (GList *)lp_data->
data;
if (lp_list) {
lp_list = g_list_first(lp_list);
while (lp_list && lp_list->data) {
} else {
}
lp_list = g_list_next(lp_list);
}
}
} else {
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Parameters
-
[in] | type | The type of certificate store to remove the specified certificate from. |
[in] | name | The assigned name of a certificate given at the time of installation. |
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS upon successful uninstallation of certificates, or an error code from the values listed below upon failure.
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_install_certificate, mdm_clear_installed_certificates
API to encrypt / decrypt internal storage.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to force internal storage encryption / decryption on user's device. The function launches com.samsung.clocksetting.encryption - a Tizen UI application dedicated for encryption settings. Internal storage encryption policy must be set to MDM_TRUE in order to call this application properly.
} else {
}
} else {
}
} else {
}
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.
- See also
- mdm_get_internal_storage_encryption_status
-
mdm_get_require_device_encryption
API to erase the device's external or internal storage.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this to wipe both SD card data and application data. Internal formatting may require rebooting of device.
- Privilege Level:
- public
- Privilege:
- http://developer.samsung.com/tizen/privilege/mdm.security
- Parameters
-
- Returns
- mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
- Return values
-
- Permission:
- Usage of this API is restricted to registered clients only.