16e7c69efSopenharmony_ci# Certificate Framework 26e7c69efSopenharmony_ci 36e7c69efSopenharmony_ci### Introduction 46e7c69efSopenharmony_ci 56e7c69efSopenharmony_ciThis sample shows how `@ohos.security.cert` works to implement the function of verifying signature data. 66e7c69efSopenharmony_ci 76e7c69efSopenharmony_ciThe implementation scenario(1): 86e7c69efSopenharmony_ci 96e7c69efSopenharmony_ci1. Signature verification scenario using correct original data and signature data: Simulate the server obtains the public key through the client certificate, verifies the signature data using the public key, and verifies the client's identity and the integrity of the original data. 106e7c69efSopenharmony_ci2. Scenario of using incorrect original or signature data for signature verification: Simulate an attacker modifying the original or signature data. When the server uses the public key for signature verification, the attacker's identity is untrustworthy or the original data is incomplete, resulting in verification failure. 116e7c69efSopenharmony_ci 126e7c69efSopenharmony_ci### Usage 136e7c69efSopenharmony_ci 146e7c69efSopenharmony_ci1. Click the **Data Display** button, and the correct certificate, original, and signature data contents will be displayed in the text boxes of the page. 156e7c69efSopenharmony_ci 166e7c69efSopenharmony_ci2. Click the **Signature Verification** button, and a pop-up window will pop up on the page, indicating that **Verification passed**. 176e7c69efSopenharmony_ci 186e7c69efSopenharmony_ci3. Click the **Modify Original Data** button, and the page will display the modified original data and the correct certificate and signature data; Click the signature verification button, and a pop-up window will pop up on the page, indicating **Verification failed**. 196e7c69efSopenharmony_ci 206e7c69efSopenharmony_ci4. Click the **Modify Signature Data** button, and the page will display the modified signature data, correct certificate, and original data; Click the signature verification button, and a pop-up window will pop up on the page, indicating **Verification failed**. 216e7c69efSopenharmony_ci5. Click the **Data Display** button to restore the display of correct certificates, original and signature data on the page; Click the **Signature Verification** button, and a pop-up window will pop up on the page, indicating that **Verification passed**. 226e7c69efSopenharmony_ci 236e7c69efSopenharmony_ci 246e7c69efSopenharmony_ciThe implementation scenario(2): 256e7c69efSopenharmony_ci 266e7c69efSopenharmony_ci1. Use certificate chain data and root certificate data for certificate chain verification scenario: Verify whether the root certificate of the certificate chain is in the trusted list. 276e7c69efSopenharmony_ci2. Using Certificate Chain Data and Certificate Revocation List: Verify that the certificate in the certificate chain has been revoked. 286e7c69efSopenharmony_ci 296e7c69efSopenharmony_ci### Usage 306e7c69efSopenharmony_ci 316e7c69efSopenharmony_ci1. Click the **Data Display** button, and the correct certificate chain, root certificate and CRL data content will be displayed in the text box. 326e7c69efSopenharmony_ci 336e7c69efSopenharmony_ci2. Click the **Certificate chain verification** button, the page pops up, indicating that **verification passed**. 346e7c69efSopenharmony_ci 356e7c69efSopenharmony_ci3. Open the **Verification certificate revocation list**, click the **Certificate chain verification** button, the page pops up, indicating that **verification failed**. 366e7c69efSopenharmony_ci 376e7c69efSopenharmony_ci### Dependency 386e7c69efSopenharmony_ci 396e7c69efSopenharmony_ci* not involved. 406e7c69efSopenharmony_ci 416e7c69efSopenharmony_ci### Constraints 426e7c69efSopenharmony_ci 436e7c69efSopenharmony_ci1. This sample can only be run on standard-system devices. 446e7c69efSopenharmony_ci2. This sample has been adapted to the API version 11 SDK, Applicable version: CI DailyBuild of 4.1.5.3 after 12/23/2023, or newer Beta versions, Release versions. 456e7c69efSopenharmony_ci3. This sample requires DevEco Studio 4.0 Release (Build Version: 4.0.0.600) or higher version to compile and run. Due to the limitations of hvigor, there are some restrictions on how to synchronize hvigor in this Sample project. These restrictions can be bypassed by following these steps: 466e7c69efSopenharmony_ci 476e7c69efSopenharmony_ci (1) Change the compileSdkVersion and compatibleSdkVersion support versions in build-profile.json5 from 11 to 10, and then synchronize hvigor. 486e7c69efSopenharmony_ci 496e7c69efSopenharmony_ci (2) After hvigor is synchronized successfully, change the compileSdkVersion and compatibleSdkVersion support versions in build-profile.json5 from 10 to 11, and then you can compile. 506e7c69efSopenharmony_ci 51