From 1cc581d3808d430d2da5d35575d2d894f256753c Mon Sep 17 00:00:00 2001 From: zhanzeyi Date: Tue, 20 Sep 2022 17:33:05 +0800 Subject: [PATCH] init code Signed-off-by: zhanzeyi --- CertificateManager/AppScope/app.json5 | 25 + .../resources/base/element/string.json | 8 + .../resources/base/media/app_icon.png | Bin 0 -> 6790 bytes CertificateManager/README.md | 67 + CertificateManager/build-profile.json5 | 54 + .../common/component/ComponentConfig.ets | 37 + .../common/component/entryComponent.ets | 143 ++ .../common/component/headComponent.ets | 67 + .../common/component/subEntryComponent.ets | 140 ++ CertificateManager/common/util/ConfigData.ts | 65 + .../common/util/LogDecorator.ts | 63 + CertificateManager/common/util/LogUtil.ts | 85 + .../common/util/ResourceUtil.ts | 47 + .../doc/image/image-20220727141455437.png | Bin 0 -> 41862 bytes CertificateManager/gradlew | 37 + CertificateManager/hvigorfile.js | 17 + CertificateManager/package-lock.json | 1652 ++++++++++++++++ CertificateManager/package.json | 18 + CertificateManager/product/phone/.gitignore | 3 + .../product/phone/build-profile.json5 | 27 + .../product/phone/hvigorfile.js | 17 + .../product/phone/package-lock.json | 5 + CertificateManager/product/phone/package.json | 14 + .../src/main/ets/Application/AbilityStage.ts | 22 + .../src/main/ets/MainAbility/MainAbility.ts | 74 + .../phone/src/main/ets/model/BundleModel.ets | 48 + .../ets/model/CertManagerVo/AppAuthorVo.ets | 33 + .../model/CertManagerVo/CertAbstractVo.ets | 35 + .../ets/model/CertManagerVo/CertInfoVo.ets | 75 + .../CertManagerVo/CredentialAbstractVo.ets | 29 + .../ets/model/CertManagerVo/CredentialVo.ets | 47 + .../src/main/ets/model/CertMangerModel.ets | 566 ++++++ .../phone/src/main/ets/model/FileIoModel.ets | 102 + .../src/main/ets/pages/cerEvidenceFa.ets | 747 ++++++++ .../main/ets/pages/certInstallAliasInput.ets | 159 ++ .../src/main/ets/pages/certManagerFa.ets | 277 +++ .../phone/src/main/ets/pages/certPwdInput.ets | 121 ++ .../phone/src/main/ets/pages/requestAuth.ets | 218 +++ .../phone/src/main/ets/pages/trustedCa.ets | 930 +++++++++ .../ets/presenter/CMAppCredAuthPresenter.ets | 103 + .../src/main/ets/presenter/CMFaPresenter.ets | 125 ++ .../main/ets/presenter/CMInstallPresenter.ets | 73 + .../ets/presenter/CMShowAppCredPresenter.ets | 115 ++ .../presenter/CMShowPrivateCredPresenter.ets | 68 + .../ets/presenter/CMShowSysCaPresenter.ets | 88 + .../ets/presenter/CMShowUserCaPresenter.ets | 97 + .../src/main/ets/stub/certStubPromise.ts | 652 +++++++ .../phone/src/main/ets/stub/certStubStruct.ts | 161 ++ .../phone/src/main/ets/stub/certStubUtil.ts | 149 ++ .../product/phone/src/main/module.json5 | 50 + .../main/resources/base/element/color.json | 272 +++ .../main/resources/base/element/float.json | 1680 +++++++++++++++++ .../main/resources/base/element/string.json | 290 +++ .../src/main/resources/base/media/ic_back.svg | 13 + .../main/resources/base/media/ic_close.svg | 3 + .../main/resources/base/media/ic_delete.svg | 13 + .../src/main/resources/base/media/ic_move.svg | 1 + .../resources/base/media/ic_public_cancel.svg | 13 + .../resources/base/media/ic_public_close.svg | 13 + .../base/media/ic_settings_arrow.svg | 28 + .../src/main/resources/base/media/icon.png | Bin 0 -> 6790 bytes .../resources/base/profile/main_pages.json | 10 + .../main/resources/en_US/element/string.json | 290 +++ .../main/resources/phone/element/float.json | 1008 ++++++++++ .../main/resources/phone/element/string.json | 48 + CertificateManager/signature/OpenHarmony.p12 | Bin 0 -> 8252 bytes .../signature/OpenHarmonyApplication.cer | 44 + CertificateManager/signature/certmanager.p7b | Bin 0 -> 3445 bytes .../ac/f9d9d313be7042d4933e55eb1e8402f6 | 1 + .../ce/f7cfa6201a1644c5a0ba82969741aea2 | Bin 0 -> 48 bytes .../fd/0/4667d093e8bc476ca6f801834e185457 | 1 + .../fd/1/f5ed619c706f4a4db277ca6beb69de56 | 1 + .../fd/2/3aa4a14d432a48efb922fca804629ff8 | 1 + LICENSE | 176 ++ OAT.xml | 66 + README.md | 41 +- 76 files changed, 11734 insertions(+), 34 deletions(-) create mode 100644 CertificateManager/AppScope/app.json5 create mode 100644 CertificateManager/AppScope/resources/base/element/string.json create mode 100644 CertificateManager/AppScope/resources/base/media/app_icon.png create mode 100644 CertificateManager/README.md create mode 100644 CertificateManager/build-profile.json5 create mode 100644 CertificateManager/common/component/ComponentConfig.ets create mode 100644 CertificateManager/common/component/entryComponent.ets create mode 100644 CertificateManager/common/component/headComponent.ets create mode 100644 CertificateManager/common/component/subEntryComponent.ets create mode 100644 CertificateManager/common/util/ConfigData.ts create mode 100644 CertificateManager/common/util/LogDecorator.ts create mode 100644 CertificateManager/common/util/LogUtil.ts create mode 100644 CertificateManager/common/util/ResourceUtil.ts create mode 100644 CertificateManager/doc/image/image-20220727141455437.png create mode 100644 CertificateManager/gradlew create mode 100644 CertificateManager/hvigorfile.js create mode 100644 CertificateManager/package-lock.json create mode 100644 CertificateManager/package.json create mode 100644 CertificateManager/product/phone/.gitignore create mode 100644 CertificateManager/product/phone/build-profile.json5 create mode 100644 CertificateManager/product/phone/hvigorfile.js create mode 100644 CertificateManager/product/phone/package-lock.json create mode 100644 CertificateManager/product/phone/package.json create mode 100644 CertificateManager/product/phone/src/main/ets/Application/AbilityStage.ts create mode 100644 CertificateManager/product/phone/src/main/ets/MainAbility/MainAbility.ts create mode 100644 CertificateManager/product/phone/src/main/ets/model/BundleModel.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertManagerVo/AppAuthorVo.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertAbstractVo.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertInfoVo.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialAbstractVo.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialVo.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/CertMangerModel.ets create mode 100644 CertificateManager/product/phone/src/main/ets/model/FileIoModel.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/cerEvidenceFa.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/certInstallAliasInput.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/certManagerFa.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/certPwdInput.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/requestAuth.ets create mode 100644 CertificateManager/product/phone/src/main/ets/pages/trustedCa.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMAppCredAuthPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMFaPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMInstallPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMShowAppCredPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMShowPrivateCredPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMShowSysCaPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/presenter/CMShowUserCaPresenter.ets create mode 100644 CertificateManager/product/phone/src/main/ets/stub/certStubPromise.ts create mode 100644 CertificateManager/product/phone/src/main/ets/stub/certStubStruct.ts create mode 100644 CertificateManager/product/phone/src/main/ets/stub/certStubUtil.ts create mode 100644 CertificateManager/product/phone/src/main/module.json5 create mode 100644 CertificateManager/product/phone/src/main/resources/base/element/color.json create mode 100644 CertificateManager/product/phone/src/main/resources/base/element/float.json create mode 100644 CertificateManager/product/phone/src/main/resources/base/element/string.json create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_back.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_close.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_delete.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_move.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_public_cancel.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_public_close.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/ic_settings_arrow.svg create mode 100644 CertificateManager/product/phone/src/main/resources/base/media/icon.png create mode 100644 CertificateManager/product/phone/src/main/resources/base/profile/main_pages.json create mode 100644 CertificateManager/product/phone/src/main/resources/en_US/element/string.json create mode 100644 CertificateManager/product/phone/src/main/resources/phone/element/float.json create mode 100644 CertificateManager/product/phone/src/main/resources/phone/element/string.json create mode 100644 CertificateManager/signature/OpenHarmony.p12 create mode 100644 CertificateManager/signature/OpenHarmonyApplication.cer create mode 100644 CertificateManager/signature/certmanager.p7b create mode 100644 CertificateManager/signature/material/ac/f9d9d313be7042d4933e55eb1e8402f6 create mode 100644 CertificateManager/signature/material/ce/f7cfa6201a1644c5a0ba82969741aea2 create mode 100644 CertificateManager/signature/material/fd/0/4667d093e8bc476ca6f801834e185457 create mode 100644 CertificateManager/signature/material/fd/1/f5ed619c706f4a4db277ca6beb69de56 create mode 100644 CertificateManager/signature/material/fd/2/3aa4a14d432a48efb922fca804629ff8 create mode 100644 LICENSE create mode 100644 OAT.xml diff --git a/CertificateManager/AppScope/app.json5 b/CertificateManager/AppScope/app.json5 new file mode 100644 index 0000000..837e5f7 --- /dev/null +++ b/CertificateManager/AppScope/app.json5 @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "bundleName": "com.example.applications_certmanager", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name", + "distributedNotificationEnabled": true + } +} diff --git a/CertificateManager/AppScope/resources/base/element/string.json b/CertificateManager/AppScope/resources/base/element/string.json new file mode 100644 index 0000000..6a6a052 --- /dev/null +++ b/CertificateManager/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "CertManager" + } + ] +} diff --git a/CertificateManager/AppScope/resources/base/media/app_icon.png b/CertificateManager/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{Fv-v&aR%aEI&JYSeRTLWm!zbv;?)_ ziZB;fwGbbeL5Q}YLx`J$lp~A09KK8t_z}PZ=4ZzgdeKtgoc+o5EvN9A1K1_<>M?MBqb#!ASf&# zEX?<)!RH(7>1P+j=jqG(58}TVN-$psA6K}atCuI!KTJD&FMmH-78ZejBm)0qc{ESp z|LuG1{QnBUJRg_E=h1#XMWt2%fcoN@l7eAS!Es?Q+;XsRNPhiiE=@AqlLkJzF`O18 zbsbSmKN=aaq8k3NFYZfDWpKmM!coBU0(XnL8R{4=i|wi{!uWYM2je{U{B*K2PVdu&=E zTq*-XsEsJ$u5H4g6DIm2Y!DN`>^v|AqlwuCD;w45K0@eqauiqWf7l&o)+YLHm~|L~ z7$0v5mkobriU!H<@mVJHLlmQqzQ3d6Rh_-|%Yy2li*tHO>_vcnuZ7OR_xkAIuIU&x z-|8Y0wj|6|a6_I(v91y%k_kNw6pnkNdxjqG8!%Vz_d%c_!X+6-;1`GC9_FpjoHev5fEV7RhJ>r=mh-jp$fqbqRJ=obwdgLDVP5+s zy1=_DWG0Y-Jb3t^WXmkr(d9~08k-|#Ly zaNOmT(^9tIb&eb4%CzIT zAm3CUtWSr1t4?h1kk#NBi{U|pJslvME{q|_eS^3En>SOqSx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Yak6?`Pp#c;**_SYmi`&z23 z`p6_~ePvH)C6x-G9$hgL=eVALq`-AiamN>!3~Lxw&{H(b{B(7xSRm6<3<{%{yXiH# zos5Rv1L+8fUKJLo%P>4I&$}y { + if (!data.resultCode) { + this.authUri = data.want.parameters.authUri; //授权成功后获取返回的authUri + } +}) +``` + diff --git a/CertificateManager/build-profile.json5 b/CertificateManager/build-profile.json5 new file mode 100644 index 0000000..06a3554 --- /dev/null +++ b/CertificateManager/build-profile.json5 @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "signingConfigs": [ + { + "name": "default", + "material": { + "storePassword": "000000161B64D26AFDA336B9D4E45469670FC05C21ACB86E817B3A0EBBEF557AEC2E73906C73", + "certpath": "signature/OpenHarmonyApplication.cer", + "keyAlias": "openharmony application release", + "keyPassword": "0000001669F0585B86DCE64A21563F2E7BA5320E86297F85E75F6EA4844BFB920AD864794581", + "profile": "signature/certmanager.p7b", + "signAlg": "SHA256withECDSA", + "storeFile": "signature/OpenHarmony.p12" + } + } + ], + "compileSdkVersion": 9, + "compatibleSdkVersion": 9, + "products": [ + { + "name": "default", + "signingConfig": "default", + } + ] + }, + "modules": [ + { + "name": "phone", + "srcPath": "./product/phone", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/CertificateManager/common/component/ComponentConfig.ets b/CertificateManager/common/component/ComponentConfig.ets new file mode 100644 index 0000000..0507a27 --- /dev/null +++ b/CertificateManager/common/component/ComponentConfig.ets @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class ComponentConfig { + WH_100_100 = '100%'; + WH_30_100 = '30%'; + WH_33_100 = '33%'; + WH_35_100 = '35%'; + WH_40_100 = '40%'; + WH_45_100 = '45%'; + WH_50_100 = '50%'; + WH_55_100 = '55%'; + WH_83_100 = '83%'; + WH_90_100 = '90%'; + value_20 = 20; + font_20 = 20; + MAX_LINES_1 = 1; + MAX_LINES_2 = 2; + MAX_LINES_3 = 3; + DURATION_TIME = 200; +} + +let componentConfig = new ComponentConfig(); + +export default componentConfig as ComponentConfig; \ No newline at end of file diff --git a/CertificateManager/common/component/entryComponent.ets b/CertificateManager/common/component/entryComponent.ets new file mode 100644 index 0000000..5140cbf --- /dev/null +++ b/CertificateManager/common/component/entryComponent.ets @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import ComponentConfig from './ComponentConfig'; + +/** + * item custom component + */ +@Component +export default struct EntryComponent { + @State isShow: Boolean = true; + @Prop settingIcon: string; + @State endTextIsShow: Boolean= true; + private settingTitle: string | Resource; + @State settingSummary: string | Resource = ''; + private settingValue: string; + @State settingArrow: string | PixelMap | Resource = ''; + @Prop settingArrowStyle: string; + private settingUri: string; + @State titleFontColor: Color | number | string | Resource = $r('sys.color.ohos_id_color_text_primary'); + private enabled: boolean = true; + private onArrowClick?: () => void; + @State isTouched: boolean = false; + private height ?= $r('app.float.wh_value_70'); + private image_wh ?= $r('app.float.wh_value_50'); + private fontSize ?= $r('sys.float.ohos_id_text_size_body1'); + private valueFontSize ?= $r('sys.float.ohos_id_text_size_body2'); + + build() { + Row() { + Row() { + Image(this.settingIcon) + .width(this.image_wh) + .height(this.image_wh) + .margin({ right: $r('app.float.wh_10') }) + .visibility('' === this.settingIcon ? Visibility.None : Visibility.Visible) + .objectFit(ImageFit.Contain) + .fillColor($r("sys.color.ohos_id_color_primary")) + Column() { + Text(this.settingTitle) + .fontColor(this.enabled ? this.titleFontColor : $r("sys.color.ohos_id_color_primary")) + .fontSize(this.fontSize) + .textAlign(TextAlign.Start) + .maxLines(ComponentConfig.MAX_LINES_3) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .fontWeight(500) + Row() { + Text($r('app.string.version')) + .fontColor($r('sys.color.ohos_id_color_text_secondary')) + .fontSize($r('sys.float.ohos_id_text_size_body2')) + .textAlign(TextAlign.Start) + .maxLines(ComponentConfig.MAX_LINES_1) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .visibility('pages/applicationInfo' === this.settingUri ? Visibility.Visible : Visibility.None) + .margin({ top: $r('sys.float.ohos_id_text_margin_vertical') }); + + Text(this.settingSummary) + .fontColor($r('sys.color.ohos_id_color_text_secondary')) + .fontSize($r('sys.float.ohos_id_text_size_body2')) + .fontWeight('sans-serif') + .textAlign(TextAlign.Start) + .maxLines(ComponentConfig.MAX_LINES_1) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .visibility('' === this.settingSummary || undefined === this.settingSummary ? Visibility.None : Visibility.Visible) + .margin({ top: $r('sys.float.ohos_id_text_margin_vertical') }); + } + } + .alignItems(HorizontalAlign.Start); + } + .flexShrink(0) + .alignItems(VerticalAlign.Center) + .align(Alignment.Start) + .layoutWeight(1) + + Row() { + Text(this.settingValue) + .fontSize(this.valueFontSize) + .fontColor($r("sys.color.ohos_id_color_primary")) + .opacity($r('sys.float.ohos_id_alpha_content_secondary')) + .fontWeight('HwChinese-medium') + .height($r('app.float.wh_value_40')) + .margin({ left: $r('sys.float.ohos_id_elements_margin_horizontal_l'), right: $r('app.float.wh_value_4') }) + .align(Alignment.End); + + if (!this.settingArrowStyle && this.settingArrow) { + Image(this.settingArrow) + .visibility('' === this.settingArrow ? Visibility.None : Visibility.Visible) + .width($r("app.float.wh_value_12")) + .height($r("app.float.wh_value_24")) + .margin({ right: $r('app.float.wh_24') }) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.opacity_0_2")) + } else if (this.settingArrow) { + Image(this.settingArrow) + .visibility('' === this.settingArrow ? Visibility.None : Visibility.Visible) + .fillColor($r("sys.color.ohos_id_color_primary")) + .width($r('app.float.wh_value_24')) + .height($r('app.float.wh_value_24')) + .margin({ right: $r('app.float.wh_24') }) + .borderRadius($r("sys.float.ohos_id_corner_radius_default_l")) + .onClick(this.onArrowClick) + + } + } + .alignItems(VerticalAlign.Center) + .align(Alignment.End); + } + .opacity(this.enabled?1:$r('sys.float.ohos_id_alpha_disabled')) + .height(this.height) + .width(ComponentConfig.WH_100_100) + .padding({ left: $r('sys.float.ohos_id_default_padding_start') }) + .borderRadius($r("sys.float.ohos_id_corner_radius_default_l")) + .linearGradient((this.enabled && this.isTouched) ? { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("app.color.DCEAF9"), 0.0], [$r("app.color.FAFAFA"), 1.0]] + } : { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("sys.color.ohos_id_color_foreground_contrary"), 1], [$r("sys.color.ohos_id_color_foreground_contrary"), 1]] + }) + .alignItems(VerticalAlign.Center) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }) + } +} \ No newline at end of file diff --git a/CertificateManager/common/component/headComponent.ets b/CertificateManager/common/component/headComponent.ets new file mode 100644 index 0000000..455b811 --- /dev/null +++ b/CertificateManager/common/component/headComponent.ets @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import ComponentConfig from './ComponentConfig'; +import Router from '@system.router'; + +/** + * head custom component + */ +@Component +export default struct HeadComponent { + private icBackIsVisibility: boolean= true; + private headName: string | Resource = ''; + @State isTouch: boolean= false; + + build() { + Row() { + Stack({ alignContent: Alignment.Center }) { + Image($r('app.media.ic_back')) + .width($r('app.float.wh_value_24')) + .height($r('app.float.wh_value_24')) + .fillColor($r("sys.color.ohos_id_color_primary")) + } + .margin({ right: $r('app.float.wh_value_16') }) + .backgroundColor(this.isTouch ? $r('app.color.color_E3E3E3_grey') : $r('app.color.color_00000000_transparent')) + .visibility(this.icBackIsVisibility ? Visibility.Visible : Visibility.None) + .onClick(() => { + Router.back(); + }) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouch = true; + } + if (event.type === TouchType.Up) { + this.isTouch = false; + } + }); + + Text(this.headName) + .fontSize($r('app.float.head_font_20')) + .lineHeight($r('app.float.wh_value_33')) + .fontFamily('HarmonyHeiTi-Bold') + .fontWeight(FontWeight.Regular) + .fontColor($r('app.color.font_color_182431')) + .maxLines(ComponentConfig.MAX_LINES_1) + .textOverflow({ overflow: TextOverflow.Ellipsis }) + .textAlign(TextAlign.Start) + .margin({ top: $r('app.float.wh_value_13'), bottom: $r('app.float.wh_value_15') }); + } + .width(ComponentConfig.WH_100_100) + .padding({ left: $r('app.float.wh_value_24') }) + .height($r('app.float.wh_value_56')) + .alignItems(VerticalAlign.Center) + .align(Alignment.Start) + } +} \ No newline at end of file diff --git a/CertificateManager/common/component/subEntryComponent.ets b/CertificateManager/common/component/subEntryComponent.ets new file mode 100644 index 0000000..2e6e871 --- /dev/null +++ b/CertificateManager/common/component/subEntryComponent.ets @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import ComponentConfig from './ComponentConfig'; + +/** + * Sub-Page Entry Component + */ +@Component +export struct SubEntryComponent { + private targetPage: string; + private title: string | Resource; + @State isTouched: boolean = false; + + build() { + Navigator({ target: this.targetPage }) { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Row() { + Text(this.title) + .fontSize($r('app.float.font_16')) + .lineHeight($r('app.float.wh_value_22')) + .fontColor($r('app.color.font_color_182431')) + .fontWeight(FontWeight.Medium) + .margin({ left: $r('app.float.distance_8') }) + .textAlign(TextAlign.Start); + } + + Image('/res/image/ic_settings_arrow.svg') + .width($r('app.float.wh_value_12')) + .height($r('app.float.wh_value_24')) + .margin({ right: $r('app.float.distance_8') }) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.opacity_0_2")) + } + .height(ComponentConfig.WH_100_100) + .width(ComponentConfig.WH_100_100) + .borderRadius($r('app.float.radius_20')) + .linearGradient(this.isTouched ? { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("app.color.DCEAF9"), 0.0], [$r("app.color.FAFAFA"), 1.0]] + } : { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("sys.color.ohos_id_color_foreground_contrary"), 1], [$r("sys.color.ohos_id_color_foreground_contrary"), 1]] + }) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }) + } + .padding($r('app.float.distance_4')) + .height($r('app.float.wh_value_56')) + .borderRadius($r('app.float.radius_24')) + .backgroundColor($r("sys.color.ohos_id_color_foreground_contrary")); + } +} + + +/** + * Sub-Page Entry Component with EndText + */ +@Component +export struct SubEntryComponentWithEndText { + @State isTouched: boolean = false; + @Prop endText: string; + private targetPage: string; + private title: string | Resource; + + build() { + Navigator({ target: this.targetPage }) { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Row() { + Text(this.title) + .fontSize($r('app.float.font_16')) + .lineHeight($r('app.float.wh_value_22')) + .fontWeight(FontWeight.Medium) + .fontColor($r('app.color.font_color_182431')) + .margin({ left: $r('app.float.distance_8') }) + .textAlign(TextAlign.Start); + } + + Row() { + Text(this.endText) + .fontSize($r('app.float.font_14')) + .lineHeight($r('app.float.wh_value_19')) + .fontWeight(FontWeight.Regular) + .fontColor($r('sys.color.ohos_id_color_text_secondary')) + .margin({ right: $r('app.float.distance_4') }) + .textAlign(TextAlign.End); + Image('/res/image/ic_settings_arrow.svg') + .width($r('app.float.wh_value_12')) + .height($r('app.float.wh_value_24')) + .margin({ right: $r('app.float.distance_8') }) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.opacity_0_2")) + } + } + .height(ComponentConfig.WH_100_100) + .width(ComponentConfig.WH_100_100) + .borderRadius($r('app.float.radius_20')) + .linearGradient(this.isTouched ? { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("app.color.DCEAF9"), 0.0], [$r("app.color.FAFAFA"), 1.0]] + } : { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("sys.color.ohos_id_color_foreground_contrary"), 1], [$r("sys.color.ohos_id_color_foreground_contrary"), 1]] + }) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }); + } + .padding($r('app.float.distance_4')) + .height($r('app.float.wh_value_56')) + .borderRadius($r('app.float.radius_24')) + .backgroundColor($r("sys.color.ohos_id_color_foreground_contrary")); + } +} \ No newline at end of file diff --git a/CertificateManager/common/util/ConfigData.ts b/CertificateManager/common/util/ConfigData.ts new file mode 100644 index 0000000..569d9d8 --- /dev/null +++ b/CertificateManager/common/util/ConfigData.ts @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class ConfigData { + + WH_100_100 = '100%'; + WH_3_100 = '3%'; + WH_4_100 = '4%'; + WH_20_100 = '20%'; + WH_25_100 = '25%'; + WH_30_100 = '30%'; + WH_33_100 = '33%'; + WH_35_100 = '35%'; + WH_40_100 = '40%'; + WH_43_100 = '43%'; + WH_45_100 = '45%'; + WH_50_100 = '50%'; + WH_53_100 = '53%'; + WH_55_100 = '55%'; + WH_60_100 = '60%'; + WH_65_100 = '65%'; + WH_70_100 = '70%'; + WH_75_100 = '75%'; + WH_80_100 = '80%'; + WH_85_100 = '85%'; + WH_88_100 = '88%'; + WH_90_100 = '90%'; + WH_92_100 = '92%'; + WH_93_100 = '93%'; + WH_94_100 = '94%'; + + value_20 = 20; + font_20 = 20; + + TAG = 'CertManager Fa ' + SWITCH_BUTTON_X_OFFSET = '-4vp' + DIALOG_DY_OFFSET = '-16vp' + + PWD_MAX_LENGTH = 64; + ALIAS_MAX_LENGTH = 64; + MAX_LINES_1 = 1; + MAX_LINES_2 = 2; + MAX_LINES_3 = 3; + DURATION_TIME = 200; + FUNCTION_TYPE_HDC = 4; + APP_AUTH_MAX_LENGTH = 4; + REQUEST_AUTH_MAX_LENGTH = 5; + VERTICAL_DIVIDER_WIDTH = 1; + +} + +let configData = new ConfigData(); +export default configData as ConfigData; \ No newline at end of file diff --git a/CertificateManager/common/util/LogDecorator.ts b/CertificateManager/common/util/LogDecorator.ts new file mode 100644 index 0000000..c883389 --- /dev/null +++ b/CertificateManager/common/util/LogDecorator.ts @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LogUtil from './LogUtil'; +import ConfigData from './ConfigData'; + +/** + * Method log decorator + */ +const LogMethod = (target: Object, methodName: string, propertyDescriptor: PropertyDescriptor): PropertyDescriptor => { + const method = propertyDescriptor.value; + + propertyDescriptor.value = function (...args: any[]) { + const params = args.map(a => JSON.stringify(a)).join(); + LogUtil.info(ConfigData.TAG + `${target.constructor.name}#${methodName}(${params}) in `); + + const result = method.apply(this, args); + const r = JSON.stringify(result); + + LogUtil.info(ConfigData.TAG + `${target.constructor.name}#${methodName}(${params}) out => ${r}`); + return result; + } + + return propertyDescriptor; +}; + +/** + * Class decorator to log all methods + */ +export const LogAll = (target: any) => { + Reflect.ownKeys(target.prototype).forEach(propertyKey => { + let propertyDescriptor: PropertyDescriptor = Object.getOwnPropertyDescriptor(target.prototype, propertyKey); + const method = propertyDescriptor.value; + + if (method) { + propertyDescriptor.value = function (...args: any[]) { + const params = args.map(a => JSON.stringify(a)).join(); + LogUtil.info(ConfigData.TAG + `${target.name}#${propertyKey.toString()}(${params}) in `); + + const result = method.apply(this, args); + const r = JSON.stringify(result); + + LogUtil.info(ConfigData.TAG + `${target.name}#${propertyKey.toString()}(${params}) out => ${r}`); + return result; + } + + Object.defineProperty(target.prototype, propertyKey, propertyDescriptor); + } + }); +} + +export default LogMethod; diff --git a/CertificateManager/common/util/LogUtil.ts b/CertificateManager/common/util/LogUtil.ts new file mode 100644 index 0000000..dcdfe6e --- /dev/null +++ b/CertificateManager/common/util/LogUtil.ts @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Log level + */ +let LogLevel = { + /** + * debug + */ + DEBUG: 3, + + /** + * info + */ + INFO: 4, + + /** + * warn + */ + WARN: 5, + + /** + * error + */ + ERROR: 6, + + /** + * fatal + */ + FATAL: 7, +}; + +const LOG_LEVEL = LogLevel.INFO + +/** + * log package tool class + */ +export class LogUtil { + debug(msg): void { + if (LogLevel.DEBUG >= LOG_LEVEL) { + console.info(msg); + } + } + + log(msg): void { + if (LogLevel.INFO >= LOG_LEVEL) { + console.log(msg); + } + } + + info(msg): void { + if (LogLevel.INFO >= LOG_LEVEL) { + console.info(msg); + } + } + + warn(msg): void { + if (LogLevel.WARN >= LOG_LEVEL) { + console.warn(msg); + } + } + + error(msg): void { + if (LogLevel.ERROR >= LOG_LEVEL) { + console.error(msg); + } + } +} + +let mLogUtil = new LogUtil(); +export default mLogUtil as LogUtil +; diff --git a/CertificateManager/common/util/ResourceUtil.ts b/CertificateManager/common/util/ResourceUtil.ts new file mode 100644 index 0000000..5fa4dea --- /dev/null +++ b/CertificateManager/common/util/ResourceUtil.ts @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import Log from './logdecorator'; + +/** + * Resource util + */ +export class ResourceUtil { + private resMgr: any; + + /** + * Initialize ResourceManager + */ + @Log + async initResourceManager(): Promise { + if (!this.resMgr) { + this.resMgr = await globalThis.certManagerAbilityContext.resourceManager; + } + } + + /** + * Get string value from NormalResource instance + * + * @param resource - NormalResource instance + */ + @Log + async getString(resource): Promise { + await this.initResourceManager(); + return await this.resMgr.getString(resource.id); + } + +} + +let resourceUtil = new ResourceUtil(); +export default resourceUtil as ResourceUtil; diff --git a/CertificateManager/doc/image/image-20220727141455437.png b/CertificateManager/doc/image/image-20220727141455437.png new file mode 100644 index 0000000000000000000000000000000000000000..b4102ad263aee8c2c955765341923f4629d2dea2 GIT binary patch literal 41862 zcmdSAbyU<}+b=wb0s>-zbO@p}(gG5qfP{3{&^3fe#|)u}l1hh!gw)UtQX(MIH8g{C z_t0_n_`C1teV+3^XRUX=Yn`>uaq-6&`Oco5*S0F7Fg+Le}axb1~czju(aIJ zn3D5IE~Wd4J;GzdvkrE>nMg7w*3TpNxezfXR#GTT@FK9%zakpF#1%ewvjpSL)}X0H8x zvbMpF68w`?VDiBE`=m$JO!W7mZ{YvTrUJShnv6V793A=V{uw_1@WkblvGs@i#0mc% zXobaMpv40HMc&w}zhg0mhFwlc2-ID_A-nj0@5ukpT#x@9y}D=ThO1{Nn54-S2Xo{5 zyM(kqmi9Wf9*s1G&jjML8-MOxplK!wpuqmkuYPv#c=r->dcJ$?bCp-|Dz|}~n_G0} zLUf0Dd0AP8onSW7lm4G=-DK2(&wd5x_+0$j6`X5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yv@RYY~ zIa`Lo@@`ihY~v^@&oUCEX0^*O6Mdh~#7yP-)4Df67#q;m*WtC*<-?Nsg;MzPcv(JO z%6`g5)_^m0@nIDPd0XzAhC&11qL_`&NT}w~O=1`hoeJU_&_m`kP$N+b#{A0DwqzB~ zaOprk5;Z~E1MX&JaBn(2t-a!qr(A8?kZd%;Zn&jsaOnHODeX#^qY)dRT?4aAKpfw1 z-!cDXPkW%Qf0bg}gd4I!tCgCl&tuRo;RzvJVuKY#r)z=8fgt4+(4P<_aUQe{f_{c0 z1A>fq!084Lvq3$;^ws~fj)OgkFB=F<~tJU4W1Z`;Cx4THhZI(8z}p(KgmNyxZ@NPeJcWow&~ zb2gXOHa&g&ON~XzKs(Mf7GHW@aKRsqA?GWe@6G9zR&&+R*H5>oOh6r(ckX#61wK_e zTQlrcP+&$QB&Vdj2UT9dP3{wPX$cjTmS@^)s+(?+;=eF*#GX=^aIS6_KHxNHatO^b zmnIG;GJWg+MI?GI$y-y&0o)Yv4Dd0A!2z*$-#*ps+&5jRu{TkkRVTqGnX(x@pd= 2.1.2 < 3.0.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://repo.huaweicloud.com/repository/npm/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + }, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "json5": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "requires": { + "readable-stream": "^2.0.5" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + } + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "liftoff": { + "version": "4.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/liftoff/-/liftoff-4.0.0.tgz", + "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", + "requires": { + "extend": "^3.0.2", + "findup-sync": "^5.0.0", + "fined": "^2.0.0", + "flagged-respawn": "^2.0.0", + "is-plain-object": "^5.0.0", + "object.map": "^1.0.1", + "rechoir": "^0.8.0", + "resolve": "^1.20.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, + "log4js": { + "version": "6.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/log4js/-/log4js-6.4.1.tgz", + "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", + "requires": { + "date-format": "^4.0.3", + "debug": "^4.3.3", + "flatted": "^3.2.4", + "rfdc": "^1.3.0", + "streamroller": "^3.0.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://repo.huaweicloud.com/repository/npm/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.6", + "resolved": "https://repo.huaweicloud.com/repository/npm/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mute-stdout": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/mute-stdout/-/mute-stdout-1.0.0.tgz", + "integrity": "sha512-MaSQenn0f9oxIjtCufclpV00MuYTiHaXPbdcfPIM+quMqoa8cXywjHHx4LhhIAZlXqPWMdcUpYviajfmHtHRJw==" + }, + "next-tick": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "requires": { + "once": "^1.3.2" + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "requires": { + "path-key": "^3.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==" + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pretty-hrtime": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", + "integrity": "sha512-CU2l5CYUAptUYq/671ajexQfXuxJFwwg0n243Kdkx8bTjeenedsWgu8TGHPm03vLfNtk3aTXgySKPp3Usykudw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdir-glob": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/readdir-glob/-/readdir-glob-1.1.1.tgz", + "integrity": "sha512-91/k1EzZwDx6HbERR+zucygRFfiPl2zkIYZtv3Jjr6Mn7SkKcVct8aVO+sSRiGMc6fLf72du3d92/uY63YPdEA==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "requires": { + "resolve": "^1.20.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-package-path": { + "version": "4.0.3", + "resolved": "https://repo.huaweicloud.com/repository/npm/resolve-package-path/-/resolve-package-path-4.0.3.tgz", + "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", + "requires": { + "path-root": "^0.1.1" + } + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://repo.huaweicloud.com/repository/npm/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.11", + "resolved": "https://repo.huaweicloud.com/repository/npm/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==" + }, + "streamroller": { + "version": "3.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/streamroller/-/streamroller-3.1.1.tgz", + "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", + "requires": { + "date-format": "^4.0.10", + "debug": "^4.3.4", + "fs-extra": "^10.1.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + }, + "dependencies": { + "is-number": { + "version": "7.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + } + } + }, + "type": { + "version": "1.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==" + }, + "undertaker": { + "version": "1.2.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==" + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://repo.huaweicloud.com/repository/npm/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://repo.huaweicloud.com/repository/npm/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha512-JHLTJJ5uqdt0peYp5mHzmSNV4uHXWphgSlKk5jg3sY5XYPTBw0hzw0SDNnYISn7pAXeAv5pKT4CNY+EcCTptBg==", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.1", + "resolved": "https://repo.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "zip-stream": { + "version": "4.1.0", + "resolved": "https://repo.huaweicloud.com/repository/npm/zip-stream/-/zip-stream-4.1.0.tgz", + "integrity": "sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A==", + "requires": { + "archiver-utils": "^2.1.0", + "compress-commons": "^4.1.0", + "readable-stream": "^3.6.0" + } + } + } +} diff --git a/CertificateManager/package.json b/CertificateManager/package.json new file mode 100644 index 0000000..9350f16 --- /dev/null +++ b/CertificateManager/package.json @@ -0,0 +1,18 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "applications_certmanager", + "ohos": { + "org": "huawei", + "directoryLevel": "project", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": { + "@ohos/hvigor-ohos-plugin": "1.0.6", + "hypium": "^1.0.0", + "@ohos/hvigor": "1.0.6" + } +} diff --git a/CertificateManager/product/phone/.gitignore b/CertificateManager/product/phone/.gitignore new file mode 100644 index 0000000..4f9a973 --- /dev/null +++ b/CertificateManager/product/phone/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/.preview +/build \ No newline at end of file diff --git a/CertificateManager/product/phone/build-profile.json5 b/CertificateManager/product/phone/build-profile.json5 new file mode 100644 index 0000000..c2a5ba2 --- /dev/null +++ b/CertificateManager/product/phone/build-profile.json5 @@ -0,0 +1,27 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "apiType": 'stageMode', + "buildOption": { + }, + "targets": [ + { + "name": "default", + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/CertificateManager/product/phone/hvigorfile.js b/CertificateManager/product/phone/hvigorfile.js new file mode 100644 index 0000000..fdb4fce --- /dev/null +++ b/CertificateManager/product/phone/hvigorfile.js @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks diff --git a/CertificateManager/product/phone/package-lock.json b/CertificateManager/product/phone/package-lock.json new file mode 100644 index 0000000..abd853c --- /dev/null +++ b/CertificateManager/product/phone/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "phone", + "version": "1.0.0", + "lockfileVersion": 1 +} diff --git a/CertificateManager/product/phone/package.json b/CertificateManager/product/phone/package.json new file mode 100644 index 0000000..e9f46ef --- /dev/null +++ b/CertificateManager/product/phone/package.json @@ -0,0 +1,14 @@ +{ + "license": "ISC", + "devDependencies": {}, + "name": "phone", + "ohos": { + "org": "huawei", + "directoryLevel": "module", + "buildTool": "hvigor" + }, + "description": "example description", + "repository": {}, + "version": "1.0.0", + "dependencies": {} +} diff --git a/CertificateManager/product/phone/src/main/ets/Application/AbilityStage.ts b/CertificateManager/product/phone/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 0000000..b3f3c30 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import AbilityStage from "@ohos.application.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/MainAbility/MainAbility.ts b/CertificateManager/product/phone/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 0000000..2294a72 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,74 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Ability from '@ohos.application.Ability'; +import certManager from '../stub/certStubPromise' + +class PwdStore { + private certPwd: string = ''; + setCertPwd(pwd) { + this.certPwd = pwd; + } + + getCertPwd() { + return this.certPwd; + } + + clearCertPwd() { + this.certPwd = ''; + } +} + +export default class MainAbility extends Ability { + onCreate(want, launchParam) { + console.log("[Demo] MainAbility onCreate") + globalThis.certManagerAbilityContext = this.context + globalThis.PwdStore = new PwdStore(); + globalThis.abilityWant = want; + globalThis.certStub = certManager; + globalThis.certStub.restoreAllMaps(); + } + + onDestroy() { + console.log("[Demo] MainAbility onDestroy") + globalThis.certStub.saveAllMaps(); + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate") + windowStage.setUIContent(this.context, "pages/certManagerFa", null) + } + + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground") + } + + onNewWant(want) { + console.log("[Demo] MainAbility onNewWant") + globalThis.abilityWant = want; + } +}; diff --git a/CertificateManager/product/phone/src/main/ets/model/BundleModel.ets b/CertificateManager/product/phone/src/main/ets/model/BundleModel.ets new file mode 100644 index 0000000..1767046 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/BundleModel.ets @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import bundle from '@ohos.bundle' +import { CMModelErrorCode } from '../model/CertMangerModel' + +export class BundleNameModel { + async getAppInfoList(AppUid, callback) { + try { + let AppInfo = { + AppImage: "", + AppName: "", + } + let AppBundleName = await bundle.getNameForUid(AppUid) + var bundleContext = await globalThis.certManagerAbilityContext.createBundleContext(AppBundleName) + + let labelId = Number(bundleContext.applicationInfo.labelId) + let iconId = Number(bundleContext.applicationInfo.iconId) + + AppInfo.AppImage = await bundleContext.resourceManager.getMediaBase64(iconId) + + AppInfo.AppName = await bundleContext.resourceManager.getString(labelId) + + console.log("AppName1111111111", JSON.stringify(AppInfo)); + + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, AppInfo) + } catch (err) { + console.log("getAppNameListErr", JSON.stringify(err.code)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null); + } + } +} + +let bundleNameModel = new BundleNameModel(); + +export default bundleNameModel as BundleNameModel; diff --git a/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/AppAuthorVo.ets b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/AppAuthorVo.ets new file mode 100644 index 0000000..c7b6444 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/AppAuthorVo.ets @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class AppAuthorVo { + appImage: string; + uid: string; + appName: string; + status: boolean; + + constructor( + appImage: string, + uid: string, + appName: string, + status: boolean) { + this.appImage = appImage; + this.uid = uid; + this.appName = appName; + this.status = status; + } + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertAbstractVo.ets b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertAbstractVo.ets new file mode 100644 index 0000000..0200438 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertAbstractVo.ets @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class CertAbstractVo { + uri: string; + certAlias: string; + status: boolean; + subjectName: string; + SubjectNameCN : string; + + constructor(uri: string, + certAlias: string, + status: boolean, + subjectName: string, + SubjectNameCN : string) { + this.uri = uri; + this.certAlias = certAlias; + this.status = status; + this.subjectName = subjectName; + this.SubjectNameCN = SubjectNameCN; + } + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertInfoVo.ets b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertInfoVo.ets new file mode 100644 index 0000000..200f877 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CertInfoVo.ets @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class CertInfoVo { + uri: string; + certAlias: string; + status: boolean; + issuerName: string; + subjectName: string; + serial: string; + notBefore: string; + notAfter: string; + fingerprintSha256: string; + cert: Uint8Array; + subjectNameMap :Map; + issuerNameMap :Map; + dateMap :Map; + + constructor(uri: string, + certAlias: string, + status: boolean, + issuerName: string, + subjectName: string, + serial: string, + notBefore: string, + notAfter: string, + fingerprintSha256: string, + cert: Uint8Array, + subjectNameMap: Map, + issuerNameMap :Map, + dateMap :Map) { + this.uri = uri; + this.certAlias = certAlias; + this.status = status; + this.issuerName = issuerName; + this.subjectName = subjectName; + this.serial = serial; + this.notBefore = notBefore; + this.notAfter = notAfter; + this.fingerprintSha256 = fingerprintSha256; + this.cert = cert; + this.subjectNameMap = subjectNameMap + this.issuerNameMap = issuerNameMap + this.dateMap = dateMap + } + + clearCertInfoVo() { + this.uri = ""; + this.certAlias = ""; + this.status = false; + this.issuerName = ""; + this.subjectName = ""; + this.serial = ""; + this.notBefore = ""; + this.notAfter = ""; + this.fingerprintSha256 = ""; + this.cert = null; + this.subjectNameMap = null; + this.issuerNameMap = null; + this.dateMap = null; + } + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialAbstractVo.ets b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialAbstractVo.ets new file mode 100644 index 0000000..70a599b --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialAbstractVo.ets @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class CredentialAbstractVo { + credType: string; + alias: string; + keyUri: string; + + constructor(credType: string, + alias: string, + keyUri: string) { + this.credType = credType; + this.alias = alias; + this.keyUri = keyUri; + } + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialVo.ets b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialVo.ets new file mode 100644 index 0000000..8554998 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertManagerVo/CredentialVo.ets @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class CredentialVo { + credType: string; + alias: string; + keyUri: string; + certNum: number; + keyNum: number; + credData: Uint8Array; + + constructor(credType: string, + alias: string, + keyUri: string, + certNum: number, + keyNum: number, + credData: Uint8Array) { + this.credType = credType; + this.alias = alias; + this.keyUri = keyUri; + this.certNum = certNum; + this.keyNum = keyNum; + this.credData = credData; + } + + clearCredentialVo() { + this.credType = ""; + this.alias = ""; + this.keyUri = ""; + this.certNum = 0; + this.keyNum = 0; + this.credData = null; + } + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/CertMangerModel.ets b/CertificateManager/product/phone/src/main/ets/model/CertMangerModel.ets new file mode 100644 index 0000000..5581d57 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/CertMangerModel.ets @@ -0,0 +1,566 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CertManagerStore } from '../stub/certStubStruct' +import { CertAbstractVo } from './CertManagerVo/CertAbstractVo' +import { CertInfoVo } from './CertManagerVo/CertInfoVo' +import { CredentialAbstractVo } from './CertManagerVo/CredentialAbstractVo' +import { CredentialVo } from './CertManagerVo/CredentialVo' + +const TAG = "CertManager Model: "; +var certManager = globalThis.certStub; + +export enum CMModelErrorCode { + CM_MODEL_ERROR_SUCCESS = 0, + CM_MODEL_ERROR_FAILED = -1, + CM_MODEL_ERROR_EXCEPTION = -2, + CM_MODEL_ERROR_UNKNOWN_OPT = -3, + CM_MODEL_ERROR_NOT_SUPPORT = -4, +} + +export enum CMModelOptType { + CM_MODEL_OPT_UNKNOWN = 0, + CM_MODEL_OPT_SYSTEM_CA = 1, + CM_MODEL_OPT_USER_CA = 2, + CM_MODEL_OPT_APP_CRED = 3, + CM_MODEL_OPT_PRIVATE_CRED = 4, +} + +export class CertMangerModel { + getCertOrCredList(optType, callback) { + console.log(TAG + "getCertOrCredList start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + this.getSystemTrustedCertificateList((errCode, certList) => { + callback(errCode, certList) + }); + break; + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.getUserTrustedCertificateList((errCode, certList) => { + callback(errCode, certList) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.getAppCredList((errCode, credList) => { + callback(errCode, credList) + }); + break; + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + this.getPrivateCredList((errCode, credList) => { + callback(errCode, credList) + }); + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT, null) + break; + } + } + + getCertOrCred(optType, uri, callback) { + console.log(TAG + "getCertOrCred start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + this.getSystemTrustedCertificate(uri, (errCode, certInfo) => { + console.info('getSystemTrustedCertificate certInfo is' + JSON.stringify(certInfo)) + callback(errCode, certInfo) + }); + break; + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.getUserTrustedCertificate(uri, (errCode, certInfo) => { + callback(errCode, certInfo) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.getAppCredential(uri, (errCode, credInfo) => { + callback(errCode, credInfo) + }); + break; + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + this.getPrivateCred(uri, (errCode, credInfo) => { + callback(errCode, credInfo) + }); + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT, null) + break; + } + } + + deleteCertOrCred(optType, uri, callback) { + console.log(TAG + "deleteCertOrCred start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.deleteUserTrustedCertificate(uri, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.deleteAppCredential(uri, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + setCertStatus(optType, uri, status, callback) { + console.log(TAG + "setCertStatus start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.setCertificateStatus(uri, CertManagerStore.CERT_MANAGER_USER_TRUSTED_STORE, status, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + this.setCertificateStatus(uri, CertManagerStore.CERT_MANAGER_SYSTEM_TRUSTED_STORE, status, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + delAllCertOrCred(optType, callback) { + console.log(TAG + "delAllCertOrCred start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.delAllUserCertificate((errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.delAllAppCredential((errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + getAuthAppList(optType, uri, callback) { + console.log(TAG + "getAuthAppList start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.getAuthorizedAppList(uri, (errCode, appUidList) => { + callback(errCode, appUidList) + }); + break; + case CMModelOptType.CM_MODEL_OPT_USER_CA: + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + setAppAuth(optType, uri, appUid, status, callback) { + console.log(TAG + "setAppAuth start"); + + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.setAuthorizedAppStatus(uri, appUid, status, (errCode, data) => { + callback(errCode, data) + }); + break; + case CMModelOptType.CM_MODEL_OPT_USER_CA: + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + installCertOrCred(optType, alias, data, pwd, callback) { + console.log(TAG + "installCertOrCred start"); + console.info(TAG + 'installCert optType: ' + optType + 'alias: ' + alias + ' pwd: ' + pwd) + switch (optType) { + case CMModelOptType.CM_MODEL_OPT_USER_CA: + this.installUserCertificate(data, alias, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_APP_CRED: + this.installAppCertificate(data, alias, pwd, (errCode) => { + callback(errCode) + }); + break; + case CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED: + case CMModelOptType.CM_MODEL_OPT_SYSTEM_CA: + callback(CMModelErrorCode.CM_MODEL_ERROR_NOT_SUPPORT) + break; + default: + callback(CMModelErrorCode.CM_MODEL_ERROR_UNKNOWN_OPT) + break; + } + } + + private async getSystemTrustedCertificateList(callback) { + console.log(TAG + "getSystemTrustedCertificateList start"); + try { + let SubjectNameCN; + let result = await certManager.getSystemTrustedCertificateList(); + let certList = new Array(); + console.log(TAG + "certManager::getSystemTrustedCertificateList result: " + JSON.stringify(result)); + for (let i = 0; i < result.certList.length; i++) { + if (result.certList[i].subjectName.length != 0) { + SubjectNameCN = result.certList[i].subjectName.match(/(?<=CN=).*?(?=,)/g).toString() + console.info('SubjectNameCN is:' + SubjectNameCN) + } + certList.push(new CertAbstractVo(result.certList[i].uri, result.certList[i].certAlias, + result.certList[i].status, result.certList[i].subjectName, SubjectNameCN)) + } + console.log(TAG + "getSystemTrustedCertificateList end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, certList) + + } catch (err) { + console.log(TAG + "getSystemTrustedCertificateList err: " + JSON.stringify(err)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async getSystemTrustedCertificate(certUri, callback) { + console.log(TAG + "getSystemTrustedCertificate start"); + try { + let result = await certManager.getSystemTrustedCertificate(certUri); + let subjectNameMap: Map = new Map() + let issuerNameMap: Map = new Map() + let dateMap: Map = new Map() + if (result.certInfo.subjectName.length != 0) { + let SubjectNameCN = result.certInfo.subjectName.match(/(?<=CN=).*?(?=,)/g) + console.info('SubjectNameCN is:' + SubjectNameCN) + let SubjectNameOU = result.certInfo.subjectName.match(/(?<=OU=).*?(?=,)/g) + console.info('SubjectNameOU is:' + SubjectNameOU) + let SubjectNameO = result.certInfo.subjectName.match(/(?<=O=).*/g) + console.info('SubjectNameO is:' + SubjectNameO) + subjectNameMap.set('常用名称:', String(SubjectNameCN)) + subjectNameMap.set('组织:', String(SubjectNameO)) + subjectNameMap.set('组织单位:', String(SubjectNameOU)) + subjectNameMap.set('序列号:', result.certInfo.serial) + } + if (result.certInfo.issuerName.length != 0) { + let IssuerNameCN = result.certInfo.subjectName.match(/(?<=CN=).*?(?=,)/g) + console.info('SubjectNameCN is:' + IssuerNameCN) + let IssuerNameOU = result.certInfo.subjectName.match(/(?<=OU=).*?(?=,)/g) + console.info('SubjectNameOU is:' + IssuerNameOU) + let IssuerNameO = result.certInfo.subjectName.match(/(?<=O=).*/g) + console.info('SubjectNameO is:' + IssuerNameO) + issuerNameMap.set('常用名称:', String(IssuerNameCN)) + issuerNameMap.set('组织:', String(IssuerNameO)) + issuerNameMap.set('组织单位:', String(IssuerNameOU)) + } + dateMap.set('颁发时间:', result.certInfo.notBefore) + dateMap.set('有效期至:', result.certInfo.notAfter) + + let certInfo = new CertInfoVo(result.certInfo.uri, result.certInfo.certAlias, + result.certInfo.status, result.certInfo.issuerName, result.certInfo.subjectName, + result.certInfo.serial, result.certInfo.notBefore, + result.certInfo.notAfter, result.certInfo.fingerprintSha256, result.certInfo.cert, + subjectNameMap, issuerNameMap, dateMap); + + console.log(TAG + "getSystemTrustedCertificate end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, certInfo) + + } catch (err) { + console.log(TAG + "getSystemTrustedCertificate err: " + JSON.stringify(err)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async getUserTrustedCertificateList(callback) { + console.log(TAG + "getUserTrustedCertificateList start"); + try { + let SubjectNameCN + let result = await certManager.getUserTrustedCertificateList(); + let certList = new Array(); + console.log(TAG + "getUserTrustedCertificateList result: " + JSON.stringify(result)); + for (let i = 0; i < result.certList.length; i++) { + if (result.certList[i].subjectName.length != 0) { + SubjectNameCN = result.certList[i].subjectName.match(/(?<=CN=).*?(?=,)/g).toString() + console.info('SubjectNameCN is:' + SubjectNameCN) + } + certList.push(new CertAbstractVo(result.certList[i].uri, result.certList[i].certAlias, + result.certList[i].status, result.certList[i].subjectName, SubjectNameCN)) + } + console.log(TAG + "getUserTrustedCertificateList end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, certList) + } catch (err) { + console.log(TAG + "getUserTrustedCertificateList err: " + JSON.stringify(err)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getUserTrustedCertificate(certUri, callback) { + console.log(TAG + "getUserTrustedCertificate start"); + try { + let result = await certManager.getUserTrustedCertificate(certUri); + let subjectNameMap: Map = new Map() + let issuerNameMap: Map = new Map() + let dateMap: Map = new Map() + + if (result.certInfo.subjectName.length != 0) { + let SubjectNameCN = result.certInfo.subjectName.match(/(?<=CN=).*?(?=,)/g) + console.info('SubjectNameCN is:' + SubjectNameCN) + let SubjectNameOU = result.certInfo.subjectName.match(/(?<=OU=).*?(?=,)/g) + console.info('SubjectNameOU is:' + SubjectNameOU) + let SubjectNameO = result.certInfo.subjectName.match(/(?<=O=).*/g) + console.info('SubjectNameO is:' + SubjectNameO) + subjectNameMap.set('常用名称:', String(SubjectNameCN)) + subjectNameMap.set('组织:', String(SubjectNameO)) + subjectNameMap.set('组织单位:', String(SubjectNameOU)) + subjectNameMap.set('序列号:', result.certInfo.serial) + } + if (result.certInfo.issuerName.length != 0) { + let IssuerNameCN = result.certInfo.subjectName.match(/(?<=CN=).*?(?=,)/g) + console.info('SubjectNameCN is:' + IssuerNameCN) + let IssuerNameOU = result.certInfo.subjectName.match(/(?<=OU=).*?(?=,)/g) + console.info('SubjectNameOU is:' + IssuerNameOU) + let IssuerNameO = result.certInfo.subjectName.match(/(?<=O=).*/g) + console.info('SubjectNameO is:' + IssuerNameO) + issuerNameMap.set('常用名称:', String(IssuerNameCN)) + issuerNameMap.set('组织:', String(IssuerNameO)) + issuerNameMap.set('组织单位:', String(IssuerNameOU)) + } + dateMap.set('颁发时间:', result.certInfo.notBefore) + dateMap.set('有效期至:', result.certInfo.notAfter) + let certInfo = new CertInfoVo(result.certInfo.uri, result.certInfo.certAlias, + result.certInfo.status, result.certInfo.issuerName, result.certInfo.subjectName, + result.certInfo.serial, result.certInfo.notBefore, + result.certInfo.notAfter, result.certInfo.fingerprintSha256, result.certInfo.cert, + subjectNameMap, issuerNameMap, dateMap); + console.log(TAG + "getUserTrustedCertificate end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, certInfo) + } catch (err) { + console.log(TAG + "getUserTrustedCertificate err: " + JSON.stringify(err)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async deleteUserTrustedCertificate(certUri, callback) { + console.log(TAG + "deleteUserTrustedCertificate start"); + try { + await certManager.uninstallUserTrustedCertificate(certUri); + console.log(TAG + "deleteUserTrustedCertificate end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.log(TAG + "deleteUserTrustedCertificate err: " + JSON.stringify(err)); + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async setCertificateStatus(certUri, store, status, callback) { + console.log(TAG + "setCertificateStatus start"); + try { + await certManager.setCertificateStatus(certUri, store, status); + console.log(TAG + "setCertificateStatus end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'setCertificateStatus fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getAppCredList(callback) { + console.log(TAG + "getAppCredList start"); + + try { + let result = await certManager.getAppCertificateList(); + let credList = new Array(); + for (let i = 0; i < result.credentialList.length; i++) { + credList.push(new CredentialAbstractVo(result.credentialList[i].type, result.credentialList[i].alias, + result.credentialList[i].keyUri)) + } + console.log(TAG + "getAppCredList end credList: " + JSON.stringify(credList)); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, credList) + } catch (err) { + console.info(TAG + 'getAppCredList fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getAppCredential(certUri, callback) { + console.log(TAG + "getAppCredential start"); + try { + let result = await certManager.getAppCertificate(certUri); + let credInfo = new CredentialVo(result.credential.type, result.credential.alias, + result.credential.keyUri, result.credential.certNum, result.credential.keyNum, result.credential.credData); + console.log(TAG + "getAppCredential end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, credInfo) + } catch (err) { + console.info(TAG + 'getAppCredential fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async deleteAppCredential(certUri, callback) { + console.log(TAG + "deleteAppCredential start"); + try { + await certManager.uninstallAppCertificate(certUri); + console.log(TAG + "deleteAppCredential end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'deleteAppCredential fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getPrivateCredList(callback) { + console.log(TAG + "getPrivateCredList start"); + + try { + let result = await certManager.getPrivateCertificateList(); + let credList = new Array(); + for (let i = 0; i < result.credentialList.length; i++) { + credList.push(new CredentialAbstractVo(result.credentialList[i].type, result.credentialList[i].alias, + result.credentialList[i].keyUri)) + } + console.log(TAG + "getPrivateCredList end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, credList) + } catch (err) { + console.info(TAG + 'getPrivateCredList fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getPrivateCred(certUri, callback) { + console.log(TAG + "getPrivateCred start"); + try { + let result = await certManager.getPrivateCertificate(certUri); + let credInfo = new CredentialVo(result.credential.type, result.credential.alias, + result.credential.keyUri, result.credential.certNum, result.credential.keyNum, result.credential.credData); + console.log(TAG + "getPrivateCred end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, credInfo) + } catch (err) { + console.info(TAG + 'getPrivateCred fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async delAllUserCertificate(callback) { + console.log(TAG + "delAllUserCertificate start"); + try { + await certManager.uninstallAllUserTrustedCertificate(); + console.log(TAG + "delAllUserCertificate end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'delAllUserCertificate fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async delAllAppCredential(callback) { + console.log(TAG + "delAllAppCredential start"); + try { + await certManager.uninstallAllAppCertificate(); + console.log(TAG + "delAllAppCredential end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'delAllAppCredential fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async getAuthorizedAppList(uri, callback) { + console.log(TAG + "getAuthorizedAppList start"); + try { + let result = await certManager.getAuthorizedAppList(uri); + console.log(TAG + "getAuthorizedAppList end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, result.appUidList) + } catch (err) { + console.info(TAG + 'getAuthorizedAppList fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION, null) + } + } + + private async setAuthorizedAppStatus(uri, appUid, status, callback) { + console.log(TAG + "setAuthorizedAppStatus start"); + try { + if (status) { + let result = await certManager.grantAppCertificate(uri, appUid); + console.log(TAG + "setAuthorizedAppStatus true end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS, result.authUri) + } else { + await certManager.removeGrantedAppCertificate(uri, appUid); + console.log(TAG + "setAuthorizedAppStatus false end"); + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } + } catch (err) { + console.info(TAG + 'setAuthorizedAppStatus fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async installUserCertificate(data, alias, callback) { + console.info(TAG + 'installUserCertificate start alias: ' + alias + 'data' + JSON.stringify(data)) + try { + await certManager.installUserTrustedCertificate({ + inData: data, + alias: alias + }); + + console.info(TAG + 'installUserCertificate end') + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'installUserCertificate fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + + private async installAppCertificate(data, alias, pwd, callback) { + console.info(TAG + 'installAppCertificate start') + try { + await certManager.installAppCertificate(data, pwd, alias); + console.info(TAG + 'installAppCertificate end') + callback(CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) + } catch (err) { + console.info(TAG + 'installAppCertificate fail, err is' + err) + callback(CMModelErrorCode.CM_MODEL_ERROR_EXCEPTION) + } + } + +} + +let certMangerModel = new CertMangerModel(); + +export default certMangerModel as CertMangerModel; \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/model/FileIoModel.ets b/CertificateManager/product/phone/src/main/ets/model/FileIoModel.ets new file mode 100644 index 0000000..7c4a287 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/model/FileIoModel.ets @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fileio from '@ohos.fileio'; +import mediaLibrary from '@ohos.multimedia.mediaLibrary'; + +export class FileIoModel { + media; + constructor() { + this.media = mediaLibrary.getMediaLibrary(globalThis.certManagerAbilityContext); + } + + getFileIdFromMediaUri(mediaUri) { + console.log("getMediaFileSuffix getFileIdFromMediaUri uri: " + mediaUri); + + let elemList = mediaUri.split("/"); + let fileIdString = elemList[elemList.length - 1]; + let fileIdNum = fileIdString.match(/\d+/g); + + return fileIdNum; + } + + getMediaFileSuffix(mediaUri, callback) { + console.log("getMediaFileSuffix start uri: " + mediaUri); + let fileKeyObj = mediaLibrary.FileKey + let fileId = this.getFileIdFromMediaUri(mediaUri); + console.log("getMediaFileSuffix start fileId: " + fileId); + let imagesFetchOp = { + selections: fileKeyObj.ID + '= ?', + selectionArgs: [fileId.toString()], + }; + let suffix; + + this.media.getFileAssets(imagesFetchOp, (error, fetchFileResult) => { + console.log("getMediaFile getFileAssets callback in fetchFileResult: "); + if (fetchFileResult != undefined) { + fetchFileResult.getFirstObject(async (error, fileAsset) => { + console.log("getMediaFile getFileAssets callback getFirstObject: "); + if (fileAsset) { + console.log("getMediaFile getFileAssets fileAsset: " + fileAsset.displayName); + suffix = fileAsset.displayName.substring(fileAsset.displayName.lastIndexOf(".") + 1); + callback(suffix); + } else { + console.log("getMediaFile getFileAssets callback getFirstObject else"); + } + }) + } else { + console.log("getMediaFile getFileAssets callback in else: "); + callback(undefined); + } + }) + } + + getMediaFileData(mediaUri, callback) { + console.log("getMediaFile start"); + + let fileKeyObj = mediaLibrary.FileKey; + let fileId = this.getFileIdFromMediaUri(mediaUri); + let imagesFetchOp = { + selections: fileKeyObj.ID + '= ?', + selectionArgs: [fileId.toString()], + }; + let fd; + + this.media.getFileAssets(imagesFetchOp, (error, fetchFileResult) => { + if (fetchFileResult != undefined) { + fetchFileResult.getFirstObject(async (error, fileAsset) => { + console.log("getMediaFile getFileAssets fileAsset: " + fileAsset.displayName); + + if (fileAsset) { + let buf = new ArrayBuffer(fileAsset.size); + fd = await fileAsset.open("r"); + fileio.read(fd, buf, (err, data) => { + if (data) { + console.info("getMediaFile read file data exist "); + callback(new Uint8Array(data.buffer)); + } else { + console.info("getMediaFile read file data: null"); + } + }); + } + }) + } + }) + } +} + +let fileIoModel = new FileIoModel(); + +export default fileIoModel as FileIoModel; diff --git a/CertificateManager/product/phone/src/main/ets/pages/cerEvidenceFa.ets b/CertificateManager/product/phone/src/main/ets/pages/cerEvidenceFa.ets new file mode 100644 index 0000000..8168788 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/cerEvidenceFa.ets @@ -0,0 +1,747 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LogUtil from '../../../../../../common/util/LogUtil'; +import ConfigData from '../../../../../../common/util/ConfigData'; +import HeadComponent from '../../../../../../common/component/headComponent'; +import CMShowAppCredPresenter from '../presenter/CMShowAppCredPresenter'; +import CMShowPrivateCredPresenter from '../presenter/CMShowPrivateCredPresenter'; +import CMFaPresenter from '../presenter/CMFaPresenter'; + +@Component +export struct DialogComponent { + @Link uidItem: CMShowAppCredPresenter; + private AppName: string; + private AppImage: string; + private Index: number; + + build() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Row() { + Image(this.AppImage) + .width($r("app.float.credentials_app_image_wh")) + .height($r("app.float.credentials_app_image_hg")) + + Text(this.AppName) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ left: $r("app.float.credentials_app_name_margin") }) + } + .alignItems(VerticalAlign.Center) + + Toggle({ type: ToggleType.Switch, isOn: true }) + .width($r("app.float.credentials_app_Toggle_wh")) + .height($r("app.float.credentials_app_Toggle_hg")) + .selectedColor($r("app.color.credentials_app_Toggle_selectColor")) + .onChange((isOn: boolean) => { + this.uidItem.appInfoList[this.Index].status = isOn + }) + .offset({ x: 7, y:0 }) + + }.height($r("app.float.wh_value_72")) + } +} + +@CustomDialog +@Component +struct CustomDialogExampleAuthor { + controller: CustomDialogController; + @Link isShowAuthDialog: boolean; + @Link AuthorInfo: CMShowAppCredPresenter; + @State updateStatusList: boolean[] = []; + + build() { + Column() { + Text($r("app.string.managerAuthApp")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start); + if (this.AuthorInfo.appInfoList.length > ConfigData.APP_AUTH_MAX_LENGTH) { + List() { + ForEach(this.AuthorInfo.appInfoList, (item, index) => { + ListItem() { + DialogComponent({ AppImage: item.appImage, AppName: item.appName, Index: index, uidItem: $AuthorInfo }) + } + }) + } + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .height(ConfigData.WH_50_100) + .divider({ + strokeWidth: $r("app.float.Evidence_strokeWidth"), + color: $r("app.color.Evidence_color")}) + .borderRadius($r("app.float.Evidence_borderRadius")) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .visibility(this.AuthorInfo.appInfoList.length > 0 ? Visibility.Visible : Visibility.None) + } else { + List() { + ForEach(this.AuthorInfo.appInfoList, (item, index) => { + ListItem() { + DialogComponent({ AppImage: item.appImage, AppName: item.appName, Index: index, uidItem: $AuthorInfo }) + } + }) + } + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .divider({ + strokeWidth: $r("app.float.Evidence_strokeWidth"), + color: $r("app.color.Evidence_color")}) + .borderRadius($r("app.float.Evidence_borderRadius")) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .visibility(this.AuthorInfo.appInfoList.length > 0 ? Visibility.Visible : Visibility.None) + } + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.cancelAuthApp")) + .onClick(() => { + this.isShowAuthDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .opacity($r("app.float.opacity_0_2")) + .height($r('app.float.wh_value_40')) + Button($r("app.string.finishAuthApp")) + .onClick(() => { + this.AuthorInfo.removeGrantedAppList(this.AuthorInfo.credInfo.keyUri) + this.isShowAuthDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_6'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@CustomDialog +@Component +struct CustomDialogExamplePrivate { + controller: CustomDialogController; + @State PriCerInfoPresenter: CMShowPrivateCredPresenter = CMShowPrivateCredPresenter.getInstance(); + + build() { + Column() { + Text($r("app.string.evidenceDetails")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text(this.PriCerInfoPresenter.credInfo.alias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.entryContains")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r('app.float.wh_value_24'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.keyNum", String(this.PriCerInfoPresenter.credInfo.keyNum))) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .opacity($r('app.float.opacity_100_60')) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.userCerNum", String(this.PriCerInfoPresenter.credInfo.certNum))) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .opacity($r('app.float.opacity_100_60')) + .alignSelf(ItemAlign.Start) + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.privateDetailsClose")) + .onClick(() => { + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@CustomDialog +@Component +struct CustomDialogDeleteWarning { + controller: CustomDialogController; + @Link deleteWarn: CMShowAppCredPresenter; + @Link isShowWarnDialog: boolean; + + build() { + Column() { + Text($r("app.string.warning_title")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + Text($r("app.string.warning_message")) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Regular) + .fontColor($r("sys.color.ohos_id_color_primary")) + .margin({ + top: $r("app.float.wh_value_16"), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.deleteAllCredCancel")) + .onClick(() => { + this.isShowWarnDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + Button($r("app.string.deleteAllCredDelete")) + .onClick(() => { + this.deleteWarn.deleteAppCred(this.deleteWarn.credInfo.keyUri); + this.isShowWarnDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_warning")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@CustomDialog +@Component +struct CustomDialogExampleApp { + controller: CustomDialogController; + @Link mShowAppCaPresenter: CMShowAppCredPresenter; + @Link isShowAuthDialog: boolean; + @Link isShowWarnDialog: boolean; + + aboutToAppear() { + this.mShowAppCaPresenter.getAuthorizedAppList(this.mShowAppCaPresenter.credInfo.keyUri) + } + + build() { + Column() { + Text($r("app.string.evidenceDetails")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text(this.mShowAppCaPresenter.credInfo.alias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.entryContains")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r('app.float.wh_value_24'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.keyNum", String(this.mShowAppCaPresenter.credInfo.keyNum))) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .opacity($r('app.float.opacity_100_60')) + .alignSelf(ItemAlign.Start) + + Text($r("app.string.userCerNum", String(this.mShowAppCaPresenter.credInfo.certNum))) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .opacity($r('app.float.opacity_100_60')) + .alignSelf(ItemAlign.Start) + + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text($r("app.string.managerAuthApp")) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + } + + Row() { + Image($r('app.media.ic_settings_arrow')) + .width($r("app.float.managerAuthApp_image_wh")) + .height($r("app.float.managerAuthApp_image_hg")) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.managerAuthApp_image_opacity")) + } + } + .onClick(() => { + this.isShowAuthDialog = true; + }) + .margin({ + top: $r('app.float.wh_value_12'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .height('48vp') + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.publicDetailsCancel")) + .onClick(() => { + this.isShowAuthDialog = false; + this.isShowWarnDialog = false; + this.controller.close(); + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + Button($r("app.string.publicDetailsDelete")) + .onClick(() => { + this.isShowWarnDialog = true; + this.isShowAuthDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_warning")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@Component +export struct componentPublic { + private Alias: string; + private KeyUri: string; + @Link mShowAppCaPresenter: CMShowAppCredPresenter; + @State @Watch("onShowAuthMngChange") isShowAuthMng: boolean = false; + @State @Watch("onShowDeleteWarnDialog") isShowWarning: boolean = false; + detailsDialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExampleApp({ + isShowAuthDialog: $isShowAuthMng, + isShowWarnDialog: $isShowWarning, + mShowAppCaPresenter: $mShowAppCaPresenter + }), + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + appDialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExampleAuthor({ isShowAuthDialog: $isShowAuthMng, AuthorInfo: $mShowAppCaPresenter }), + autoCancel: false, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + deleteWarnDialog: CustomDialogController = new CustomDialogController({ + builder: CustomDialogDeleteWarning({ isShowWarnDialog: $isShowWarning, deleteWarn: $mShowAppCaPresenter }), + autoCancel: false, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + onShowAuthMngChange() { + if (this.isShowAuthMng == true) { + this.appDialogController.open(); + } else { + this.detailsDialogController.close(); + this.detailsDialogController.open(); + this.appDialogController.close(); + } + } + + onShowDeleteWarnDialog() { + if (this.isShowWarning == true) { + this.deleteWarnDialog.open(); + } else { + this.detailsDialogController.close(); + this.deleteWarnDialog.close(); + } + } + + build() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(this.Alias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + } + .margin({ + left: $r("app.float.publicList_margin") + }) + + Row() { + Image($r('app.media.ic_settings_arrow')) + .width($r("app.float.publicList_image_wh")) + .height($r("app.float.publicList_image_hg")) + } + .margin({ + left: $r("app.float.publicList_margin"), + right: $r("app.float.publicList_image_margin") + }) + } + .height($r("app.float.wh_value_48")) + .borderRadius($r("app.float.publicList_borderRadius")) + .onClick(() => { + this.mShowAppCaPresenter.getAppCred(this.KeyUri) + this.detailsDialogController.open() + }) + } +} + +@Component +export struct componentPrivate { + private Alias: string; + private KeyUri: string; + @State PrivateCerPresenter: CMShowPrivateCredPresenter = CMShowPrivateCredPresenter.getInstance(); + privateDetailDialog: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExamplePrivate(), + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + build() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(this.Alias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + } + .margin({ + left: $r("app.float.publicList_margin") + }) + + Row() { + Image($r('app.media.ic_settings_arrow')) + .width($r("app.float.publicList_image_wh")) + .height($r("app.float.publicList_image_hg")) + } + .margin({ + left: $r("app.float.publicList_margin"), + right: $r("app.float.publicList_image_margin") + }) + } + .height($r("app.float.wh_value_48")) + .borderRadius($r("app.float.publicList_borderRadius")) + .onClick(() => { + this.PrivateCerPresenter.getPrivateCred(this.KeyUri) + this.privateDetailDialog.open() + }) + } +} + +@Entry +@Component +struct evidenceList { + @State mShowAppCaPresenter: CMShowAppCredPresenter = CMShowAppCredPresenter.getInstance(); + @State mShowPrivateCaPresenter: CMShowPrivateCredPresenter = CMShowPrivateCredPresenter.getInstance(); + @State mFaPresenter: CMFaPresenter = CMFaPresenter.getInstance(); + @State isTouched: boolean = false; + @State currentIndex: number = 0 + @State fontColor: Resource = $r("app.color.evidenceList_TabBuilder_fontColor_182431") + private controller: TabsController = new TabsController(); + + @Builder TabBuilder(index: number) { + Column() { + Text(index == 0 ? $r('app.string.tabName_public') : $r('app.string.tabName_private')) + .fontColor(this.currentIndex === index ? $r("sys.color.ohos_id_color_bottom_tab_icon") : this.fontColor) + .fontSize($r('app.float.font_16')) + .fontWeight(this.currentIndex === index ? FontWeight.Medium : FontWeight.Regular) + .alignSelf(ItemAlign.Center) + .margin({ + top: $r('app.float.TrustedEvidence_TabBuilder_Text_padding_top_value') }) + if (this.currentIndex === index) { + Divider() + .width($r('app.float.TrustedEvidence_TabBuilder_Divider_width_value')) + .margin({ top: $r('app.float.TrustedEvidence_TabBuilder_Divider_padding_top_value') }) + .strokeWidth(2) + .color($r("sys.color.ohos_id_color_bottom_tab_icon")) + .alignSelf(ItemAlign.Center) + } + } + .width(ConfigData.WH_100_100) + } + + aboutToAppear() { + LogUtil.info('in aboutToAppear'); + this.mShowAppCaPresenter.updateAppCredList(); + this.mShowPrivateCaPresenter.updatePrivateCredList(); + } + + onPageShow() { + let uri = globalThis.abilityWant.uri; + globalThis.abilityWant.uri = ""; + + if (uri === "certInstall") { + this.mFaPresenter.startInstall(); + } else if (uri === "requestAuthorize") { + this.mFaPresenter.startRequestAuth(globalThis.abilityWant.parameters.appUid); + } + } + + build() { + Column() { + GridContainer({ + columns: 12, + sizeType: SizeType.Auto, + gutter: vp2px(1) === 2 ? '12vp' : '0vp', + margin: vp2px(1) === 2 ? '24vp' : '0vp' + }) { + Row() { + Column() { + HeadComponent({ headName: $r('app.string.userEvidence') }) + Column() { + Tabs({ barPosition: BarPosition.Start, index: 0, controller: this.controller }) { + TabContent() { + List() { + ForEach(this.mShowAppCaPresenter.credList, (item) => { + ListItem() { + componentPublic({ + Alias: item.alias, + KeyUri: item.keyUri, + mShowAppCaPresenter: $mShowAppCaPresenter + }) + } + }, item => JSON.stringify(item)) + } + .width(ConfigData.WH_92_100) + .margin({ + left: ConfigData.WH_4_100 + }) + .divider({ + strokeWidth: $r("app.float.Evidence_strokeWidth"), + color: $r("app.color.Evidence_color"), + startMargin: $r("app.float.Evidence_startMargin"), + endMargin: $r("app.float.Evidence_endMargin") + }) + .borderRadius($r("app.float.Evidence_borderRadius")) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .visibility(this.mShowAppCaPresenter.credList.length > 0 ? Visibility.Visible : Visibility.None) + } + .tabBar(this.TabBuilder(0)) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }) + + TabContent() { + List() { + ForEach(this.mShowPrivateCaPresenter.credList, (item) => { + ListItem() { + componentPrivate({ Alias: item.alias, KeyUri: item.keyUri }) + } + }, item => JSON.stringify(item)) + } + .width(ConfigData.WH_92_100) + .margin({ + left: ConfigData.WH_4_100 + }) + .divider({ + strokeWidth: $r("app.float.Evidence_strokeWidth"), + color: $r("app.color.Evidence_color"), + startMargin: $r("app.float.Evidence_startMargin"), + endMargin: $r("app.float.Evidence_endMargin") }) + .borderRadius($r("app.float.Evidence_borderRadius")) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .visibility(this.mShowPrivateCaPresenter.credList.length > 0 ? Visibility.Visible : Visibility.None) + } + .tabBar(this.TabBuilder(1)) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }); + } + .vertical(false) + .scrollable(true) + .barMode(BarMode.Fixed) + .barWidth('192vp') + .barHeight($r("app.float.Evidence_barHeight")) + .animationDuration(400) + .width(ConfigData.WH_100_100) + .backgroundColor($r("app.color.TrustedEvidence_tabs_backgroundColor_F1F3F5")) + .onChange((index: number) => { + this.currentIndex = index + }); + } + .height(ConfigData.WH_94_100) + .width(ConfigData.WH_100_100) + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 12, offset: 0 }, sm: { span: 12, offset: 0 }, + md: { span: 12, offset: 0 }, lg: { span: 8, offset: 2 } + }); + + Column() { + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 0, offset: 12 }, sm: { span: 0, offset: 12 }, + md: { span: 0, offset: 12 }, lg: { span: 2, offset: 10 } + }) + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } +} diff --git a/CertificateManager/product/phone/src/main/ets/pages/certInstallAliasInput.ets b/CertificateManager/product/phone/src/main/ets/pages/certInstallAliasInput.ets new file mode 100644 index 0000000..2144cdf --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/certInstallAliasInput.ets @@ -0,0 +1,159 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import HeadComponent from '../../../../../../common/component/headComponent'; +import LogUtil from '../../../../../../common/util/LogUtil'; +import ConfigData from '../../../../../../common/util/ConfigData'; +import router from '@system.router'; +import CMInstallPresenter from '../presenter/CMInstallPresenter'; +import CMFaPresenter from '../presenter/CMFaPresenter'; + +@Entry +@Component +struct CertInstallAliasInput { + @State mAppCredAuthPresenter: CMInstallPresenter = CMInstallPresenter.getInstance(); + @State mFaPresenter: CMFaPresenter = CMFaPresenter.getInstance(); + @State certAlias: string = ""; + + onPageShow() { + let uri = globalThis.abilityWant.uri; + globalThis.abilityWant.uri = ""; + + if (uri === "certInstall") { + this.mFaPresenter.startInstall(); + } else if (uri === "requestAuthorize") { + this.mFaPresenter.startRequestAuth(globalThis.abilityWant.parameters.appUid); + } + } + + build() { + Column() { + Column() { + HeadComponent({ headName: $r('app.string.certificateAliasTab') }); + Text($r('app.string.certificateAliasInfo')) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontWeight(FontWeight.Medium) + .margin({ + top: $r('app.float.distance_24'), + left: $r('app.float.distance_24') + }) + .alignSelf(ItemAlign.Start) + + TextInput() + .type(InputType.Normal) + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .enterKeyType(EnterKeyType.Done) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontWeight(FontWeight.Medium) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .onChange((value: string) => { + this.certAlias = value; + }) + .maxLength(ConfigData.ALIAS_MAX_LENGTH) + .margin({ + left: $r('app.float.distance_24'), + right: $r('app.float.distance_24') + }) + .height($r('app.float.distance_48')) + + Row() { + Divider().color($r('app.color.CertManager_Divider_Color_182431')) + } + .margin({ + left: $r('app.float.distance_24'), + right: $r('app.float.distance_24'), + }) + + Text($r('app.string.installAliasInputInfo')) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .margin({ + left: $r('app.float.distance_24'), + top: $r('app.float.distance_16') + }) + .alignSelf(ItemAlign.Start) + .opacity($r('app.float.opacity_100_60')) + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_75_100); + + Column() { + Row() { + Button() { + Text($r('app.string.installAliasInputCancel')) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Medium) + .fontColor($r('sys.color.ohos_id_color_text_hyperlink')) + } + .type(ButtonType.Capsule) + .backgroundColor($r('app.color.install_cancel_bt_bg_color')) + .width($r('app.float.component_button_width_phone')) + .height($r('app.float.application_button_height')) + .margin({ + left: $r('app.float.distance_24'), + }) + .onClick(() => { + router.back(); + }) + + if ((this.certAlias.length > 0) && (this.certAlias[0] != ' ')) { + Button() { + Text($r('app.string.installAliasInputConfirm')) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Medium) + .fontColor($r('app.color.install_confirm_bt_font_color')) + } + .type(ButtonType.Capsule) + .backgroundColor($r('app.color.install_confirm_bt_bg_color')) + .width($r('app.float.component_button_width_phone')) + .height($r('app.float.application_button_height')) + .margin({ + left: $r('app.float.distance_16'), + right: $r('app.float.distance_24'), + }) + .onClick(() => { + this.mAppCredAuthPresenter.installCert(router.getParams().uri, + this.certAlias, + router.getParams().suffix); + }) + } else { + Button() { + Text($r('app.string.installAliasInputConfirm')) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Medium) + .fontColor($r('app.color.install_confirm_bt_font_color')) + } + .type(ButtonType.Capsule) + .backgroundColor($r('app.color.install_confirm_bt_bg_disable_color')) + .width($r('app.float.component_button_width_phone')) + .height($r('app.float.application_button_height')) + .margin({ + left: $r('app.float.distance_16'), + right: $r('app.float.distance_24'), + }) + } + } + .margin({ bottom: $r('app.float.wh_value_24') }) + } + .justifyContent(FlexAlign.End) + .height(ConfigData.WH_25_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } +} diff --git a/CertificateManager/product/phone/src/main/ets/pages/certManagerFa.ets b/CertificateManager/product/phone/src/main/ets/pages/certManagerFa.ets new file mode 100644 index 0000000..493ee39 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/certManagerFa.ets @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ConfigData from '../../../../../../common/util/ConfigData'; +import HeadComponent from '../../../../../../common/component/headComponent'; +import { SubEntryComponent } from '../../../../../../common/component/subEntryComponent'; +import CMFaPresenter from '../presenter/CMFaPresenter'; + +@Entry +@Component +struct CertificateComponent { + @State touchedItem: boolean = false; + @State columnMargin: string = '12vp'; + @State mFaPresenter: CMFaPresenter = CMFaPresenter.getInstance(); + + build() { + Column() { + + GridContainer({ + columns: 12, + sizeType: SizeType.Auto, + gutter: vp2px(1) === 2 ? '12vp' : '0vp', + margin: vp2px(1) === 2 ? '24vp' : '0vp' + }) { + Row({}) { + Column() { + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 0, offset: 0 }, sm: { span: 0, offset: 0 }, + md: { span: 0, offset: 0 }, lg: { span: 2, offset: 0 } + }); + + Column() { + HeadComponent({ headName: $r('app.string.certificateTab') }) + Column({ space: this.columnMargin }) { + + SubEntryComponent({ targetPage: "pages/trustedCa", title: $r("app.string.trustedEvidence") }) + + SubEntryComponent({ targetPage: 'pages/cerEvidenceFa', title: $r("app.string.userEvidence") }) + + CertInstallComponent({ mFaPresenter: $mFaPresenter }) + + DeleteAll({ mFaPresenter: $mFaPresenter }) + } + .margin({ top: $r("app.float.distance_8") }) + .width(ConfigData.WH_100_100) + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .padding({ left: $r('app.float.wh_24'), right: $r('app.float.wh_24') }) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 12, offset: 0 }, sm: { span: 12, offset: 0 }, + md: { span: 12, offset: 0 }, lg: { span: 8, offset: 2 } + }); + + Column() { + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 0, offset: 12 }, sm: { span: 0, offset: 12 }, + md: { span: 0, offset: 12 }, lg: { span: 2, offset: 10 } + }) + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + + onPageShow() { + let uri = globalThis.abilityWant.uri; + globalThis.abilityWant.uri = ""; + + if (uri === "certInstall") { + this.mFaPresenter.startInstall(); + } else if (uri === "requestAuthorize") { + this.mFaPresenter.startRequestAuth(globalThis.abilityWant.parameters.appUid); + } + } +} + +@CustomDialog +@Component +struct CustomDialogExampleDeleteAll { + controller: CustomDialogController; + @Link deleteAll: CMFaPresenter; + + build() { + Column() { + Text($r("app.string.deleteAllCredDialogTitle")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + Text($r("app.string.deleteAllCredDialogMessage")) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Regular) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .margin({ + top: $r("app.float.wh_value_16"), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.deleteAllCredCancel")) + .onClick(() => { + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + Button($r("app.string.deleteAllCredDelete")) + .onClick(() => { + this.deleteAll.uninstallAllCert(); + this.controller.close() + }) + .backgroundColor($r("app.color.credentials_app_finish_backgroundColor")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .fontColor($r("sys.color.ohos_id_color_warning")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@Component +struct DeleteAll { + @State isTouched: boolean = false; + @Link mFaPresenter: CMFaPresenter; + + deleteWarnDialog: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExampleDeleteAll({ deleteAll: $mFaPresenter }), + autoCancel: true, + alignment:DialogAlignment.Bottom, + offset :{ dx:0, dy:ConfigData.DIALOG_DY_OFFSET } + }) + + build() { + Row() { + Text($r("app.string.deleteAllCred")) + .fontSize($r('app.float.font_16')) + .lineHeight($r('app.float.wh_value_22')) + .fontWeight(FontWeight.Medium) + .fontColor($r('app.color.cm_del_all_font_color')) + .margin({ left: $r('app.float.distance_8') }) + .textAlign(TextAlign.Start); + } + .padding($r('app.float.distance_4')) + .height($r('app.float.wh_value_56')) + .width(ConfigData.WH_100_100) + .borderRadius($r('app.float.radius_24')) + .linearGradient(this.isTouched ? { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("app.color.DCEAF9"), 0.0], [$r("app.color.FAFAFA"), 1.0]] + } : { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("sys.color.ohos_id_color_foreground_contrary"), 1], + [$r("sys.color.ohos_id_color_foreground_contrary"), 1]] + }) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }) + .onClick(() => { + this.deleteWarnDialog.open(); + }) + } +} + +@Component +export struct CertInstallComponent { + @State isTouched: boolean = false; + @Link mFaPresenter: CMFaPresenter; + + build() { + Column() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Row() { + Text($r('app.string.installInStorageDevice')) + .fontSize($r('app.float.font_16')) + .lineHeight($r('app.float.wh_value_22')) + .fontColor($r('app.color.font_color_182431')) + .fontWeight(FontWeight.Medium) + .margin({ left: $r('app.float.distance_8') }) + .textAlign(TextAlign.Start); + } + + Image('/res/image/ic_settings_arrow.svg') + .width($r('app.float.wh_value_12')) + .height($r('app.float.wh_value_24')) + .margin({ right: $r('app.float.distance_8') }) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.opacity_0_2")) + } + .height(ConfigData.WH_100_100) + .width(ConfigData.WH_100_100) + .borderRadius($r('app.float.radius_20')) + .linearGradient(this.isTouched ? { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("app.color.DCEAF9"), 0.0], [$r("app.color.FAFAFA"), 1.0]] + } : { + angle: 90, + direction: GradientDirection.Right, + colors: [[$r("sys.color.ohos_id_color_foreground_contrary"), 1], + [$r("sys.color.ohos_id_color_foreground_contrary"), 1]] + }) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }) + } + .padding($r('app.float.distance_4')) + .backgroundColor($r('app.color.white_bg_color')) + .height($r('app.float.wh_value_56')) + .borderRadius($r('app.float.radius_24')) + .onClick(() => { + this.mFaPresenter.requestPermissions() + }); + } +} diff --git a/CertificateManager/product/phone/src/main/ets/pages/certPwdInput.ets b/CertificateManager/product/phone/src/main/ets/pages/certPwdInput.ets new file mode 100644 index 0000000..b4f2c05 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/certPwdInput.ets @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import HeadComponent from '../../../../../../common/component/headComponent'; +import ConfigData from '../../../../../../common/util/ConfigData'; +import router from '@system.router'; +import CMFaPresenter from '../presenter/CMFaPresenter'; + +@Entry +@Component +struct CertPwdInput { + certPwd: string = ""; + @State mFaPresenter: CMFaPresenter = CMFaPresenter.getInstance(); + + onPageShow() { + let uri = globalThis.abilityWant.uri; + globalThis.abilityWant.uri = ""; + + if (uri === "certInstall") { + this.mFaPresenter.startInstall(); + } else if (uri === "requestAuthorize") { + this.mFaPresenter.startRequestAuth(globalThis.abilityWant.parameters.appUid); + } + } + + build() { + Column() { + Column() { + HeadComponent({ headName: $r('app.string.certificatePwdTab') }); + Text($r('app.string.certificatePwdInfo')) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontWeight(FontWeight.Medium) + .margin({ + top: $r('app.float.distance_24'), + left: $r('app.float.distance_24') + }) + .alignSelf(ItemAlign.Start); + + TextInput() + .type(InputType.Password) + .onChange((value: string) => { + this.certPwd = value; + }) + .maxLength(ConfigData.PWD_MAX_LENGTH) + .margin({ + top: $r('app.float.distance_16'), + left: $r('app.float.distance_24'), + right: $r('app.float.distance_24') + }) + .height('40vp') + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_75_100); + + Column() { + Row() { + Button() { + Text($r('app.string.installPwdInputCancel')) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Medium) + .fontColor($r('sys.color.ohos_id_color_text_hyperlink')) + } + .type(ButtonType.Capsule) + .backgroundColor($r('app.color.install_cancel_bt_bg_color')) + .width($r('app.float.component_button_width_phone')) + .height($r('app.float.application_button_height')) + .margin({ + left: $r('app.float.distance_24'), + }) + .onClick(() => { + router.back(); + }) + + Button() { + Text($r('app.string.installPwdInputConfirm')) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Medium) + .fontColor($r('app.color.install_confirm_bt_font_color')) + } + .type(ButtonType.Capsule) + .backgroundColor($r('app.color.install_confirm_bt_bg_color')) + .width($r('app.float.component_button_width_phone')) + .height($r('app.float.application_button_height')) + .margin({ + left: $r('app.float.distance_16'), + right: $r('app.float.distance_24'), + }) + .onClick(() => { + globalThis.PwdStore.setCertPwd(this.certPwd) + router.push({ + uri: 'pages/certInstallAliasInput', + params: { + uri: router.getParams().uri, + suffix: router.getParams().suffix + } + }) + }) + } + .margin({ bottom: $r('app.float.wh_value_24') }) + } + .justifyContent(FlexAlign.End) + .height(ConfigData.WH_25_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } +} diff --git a/CertificateManager/product/phone/src/main/ets/pages/requestAuth.ets b/CertificateManager/product/phone/src/main/ets/pages/requestAuth.ets new file mode 100644 index 0000000..b9ee4df --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/requestAuth.ets @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import LogUtil from '../../../../../../common/util/LogUtil'; +import CMAppCredAuthPresenter from '../presenter/CMAppCredAuthPresenter'; +import router from '@system.router'; +import ConfigData from '../../../../../../common/util/ConfigData'; + +@CustomDialog +@Component +struct CustomDialogAuthForApp { + controller: CustomDialogController + @State mAppCredAuthPresenter: CMAppCredAuthPresenter = CMAppCredAuthPresenter.getInstance(); + selectUri: string = ""; + + aboutToAppear(): void { + LogUtil.info('certPwdInput about to appear'); + this.mAppCredAuthPresenter.UpdateAppNameFromUid(router.getParams().appUid); + this.mAppCredAuthPresenter.updateAppCredList(); + } + + build() { + Column() { + Text($r('app.string.pickCredToAuth')) + .fontSize($r('sys.float.ohos_id_text_size_dialog_tittle')) + .height($r("app.float.wh_value_56")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Text($r('app.string.requestAuthMsg', this.mAppCredAuthPresenter.appName)) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r('app.float.wh_value_8'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + if (this.mAppCredAuthPresenter.credList.length > ConfigData.REQUEST_AUTH_MAX_LENGTH) { + List() { + ForEach(this.mAppCredAuthPresenter.credList, (item) => { + ListItem() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + + Column() { + Text(item.alias) + .fontSize($r('app.float.font_18')) + .fontColor($r('app.color.request_auth_font_color')) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Start); + } + .alignItems(HorizontalAlign.Start) + + Column() { + Radio({ value: item.alias, group: 'appCredGroup' }) + .checked(false) + .onChange((value: boolean) => { + console.log(item.alias + ' status is ' + value) + if (value) { + this.selectUri = item.keyUri; + console.log('selectUri is ' + this.selectUri) + } + }) + } + .alignItems(HorizontalAlign.End) + } + .width(ConfigData.WH_100_100) + } + .height($r('app.float.wh_value_64')) + }, item => JSON.stringify(item)) + } + .height(ConfigData.WH_50_100) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .divider({ + strokeWidth: $r("app.float.request_auth_strokeWidth"), + color: $r("app.color.request_auth_color"), + endMargin: $r("app.float.request_auth_divider_endMargin")}) + .borderRadius($r("app.float.request_auth_borderRadius")) + .backgroundColor($r("app.color.request_auth_background_color")) + .visibility(this.mAppCredAuthPresenter.credList.length > 0 ? Visibility.Visible : Visibility.None) + } else { + List() { + ForEach(this.mAppCredAuthPresenter.credList, (item) => { + ListItem() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(item.alias) + .fontSize($r('app.float.font_18')) + .fontColor($r('app.color.request_auth_font_color')) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Start); + } + .alignItems(HorizontalAlign.Start) + + Column() { + Radio({ value: item.alias, group: 'appCredGroup' }) + .checked(false) + .onChange((value: boolean) => { + console.log(item.alias + ' status is ' + value) + if (value) { + this.selectUri = item.keyUri; + console.log('selectUri is ' + this.selectUri) + } + }) + } + .alignItems(HorizontalAlign.End) + } + .width(ConfigData.WH_100_100) + } + .height($r('app.float.wh_value_64')) + }, item => JSON.stringify(item)) + } + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .divider({ + strokeWidth: $r("app.float.request_auth_strokeWidth"), + color: $r("app.color.request_auth_color"), + endMargin: $r("app.float.request_auth_divider_endMargin") }) + .borderRadius($r("app.float.request_auth_borderRadius")) + .backgroundColor($r("app.color.request_auth_background_color")) + .visibility(this.mAppCredAuthPresenter.credList.length > 0 ? Visibility.Visible : Visibility.None) + } + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r('app.string.requestAuthCancel')) + .onClick(() => { + this.mAppCredAuthPresenter.cancelProcess(); + this.controller.close(); + }) + .backgroundColor($r('app.color.request_auth_background_color')) + .fontColor($r('sys.color.ohos_id_color_text_hyperlink')) + .fontSize($r('sys.float.ohos_id_text_size_button1')) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + + Button($r('app.string.requestAuthFinish')) + .onClick(() => { + LogUtil.info('requestAuthorize uri: ' + this.selectUri); + if (router.getParams() && router.getParams().appUid) { + LogUtil.info('requestAuthorize appUid: ' + router.getParams().appUid); + this.mAppCredAuthPresenter.requestAuthorize(this.selectUri, router.getParams().appUid); + this.controller.close(); + } else { + LogUtil.info('requestAuthorize fail'); + } + }) + .backgroundColor($r('app.color.request_auth_background_color')) + .fontColor($r('sys.color.ohos_id_color_text_hyperlink')) + .fontSize($r('sys.float.ohos_id_text_size_button1')) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@Entry +@Component +struct RadioAuth { + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogAuthForApp(), + autoCancel: false, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + aboutToAppear() { + LogUtil.info('RadioAuth aboutToAppear'); + + if (router.getParams() && router.getParams().appUid) { + this.dialogController.open(); + } else { + router.replace({ uri: "pages/certManagerFa" }); + } + } + + build() { + } +} diff --git a/CertificateManager/product/phone/src/main/ets/pages/trustedCa.ets b/CertificateManager/product/phone/src/main/ets/pages/trustedCa.ets new file mode 100644 index 0000000..4b2fe31 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/pages/trustedCa.ets @@ -0,0 +1,930 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import LogUtil from '../../../../../../common/util/LogUtil'; +import ConfigData from '../../../../../../common/util/ConfigData'; +import HeadComponent from '../../../../../../common/component/headComponent'; +import CMShowSysCaPresenter from '../presenter/CMShowSysCaPresenter'; +import CMShowUserCaPresenter from '../presenter/CMShowUserCaPresenter'; +import CMFaPresenter from '../presenter/CMFaPresenter'; + +@Component +struct DialogSubjectComponent { + private map: Map; + private subjectNameCN: string = '' + private subjectNameO: string = '' + private subjectNameOU: string = '' + private serial: string = '' + aboutToAppear() { + if (this.map != null) { + this.subjectNameCN = this.map.get('常用名称:') + this.subjectNameO = this.map.get('组织:') + this.subjectNameOU = this.map.get('组织单位:') + this.serial = this.map.get('序列号:') + } + } + build() { + Column() { + Text($r("app.string.DialogSubjectComponent_firText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.DialogSubjectComponent_Text_margin_top_value") + }) + Text(this.subjectNameCN) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_secText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.CustomDialogExample_Button_margin_top_value") + }) + Text(this.subjectNameO) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_thdText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.CustomDialogExample_Button_margin_top_value") + }) + Text(this.subjectNameOU) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_fouText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + Text(this.serial) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + }.alignItems(HorizontalAlign.Start); + } +} + +@Component +struct DialogIssuerComponent { + private map: Map; + private issuerNameCN: string = '' + private issuerNameO: string = '' + private issuerNameOU: string = '' + aboutToAppear() { + if (this.map != null) { + this.issuerNameCN = this.map.get('常用名称:') + this.issuerNameO = this.map.get('组织:') + this.issuerNameOU = this.map.get('组织单位:') + } + } + + build() { + Column() { + Text($r("app.string.DialogSubjectComponent_firText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_10") + }) + Text(this.issuerNameCN) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_secText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.CustomDialogExample_Button_margin_top_value") + }) + Text(this.issuerNameO) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_thdText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.CustomDialogExample_Button_margin_top_value") + }) + Text(this.issuerNameOU) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + }.alignItems(HorizontalAlign.Start); + } +} + +@Component +struct DialogDateComponent { + private map: Map; + private notBefore: string = '' + private notAfter: string = '' + aboutToAppear() { + if (this.map != null) { + this.notBefore = this.map.get('颁发时间:') + this.notAfter = this.map.get('有效期至:') + } + } + + build() { + Column() { + Text($r("app.string.DialogSubjectComponent_fifText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_10") + }) + Text(this.notBefore) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + Text($r("app.string.DialogSubjectComponent_sixText")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.CustomDialogExample_Button_margin_top_value") + }) + Text(this.notAfter) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + }.alignItems(HorizontalAlign.Start); + } +} + +@Component +struct DialogFingerPrintComponent { + private fingerprintSha256: string; + + build() { + Column() { + Text($r("app.string.CustomDialogExample_FingerPrint_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_10") + }) + Text(this.fingerprintSha256) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + right: $r("app.float.wh_value_24") + }) + }.alignItems(HorizontalAlign.Start); + } +} + +@CustomDialog +@Component +struct CustomDialogDeleteWarning { + controller: CustomDialogController; + @Link deleteWarn: CMShowUserCaPresenter; + @Link mShowUserListPresenter: CMShowUserCaPresenter; + @Link isShowWarnDialog: boolean; + + build() { + Column() { + Text($r("app.string.CustomDialogExampleUser_warning_Button_title_text")) + .height($r("app.float.wh_value_56")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + Text($r("app.string.CustomDialogExampleUser_warning_Button_message_text")) + .fontSize($r('sys.float.ohos_id_text_size_body1')) + .fontWeight(FontWeight.Regular) + .fontColor($r("sys.color.ohos_id_color_primary")) + .margin({ + top: $r("app.float.wh_value_16"), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + .alignSelf(ItemAlign.Start) + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.deleteAllCredCancel")) + .onClick(() => { + this.isShowWarnDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + Divider() + .strokeWidth(1) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + Button($r("app.string.deleteAllCredDelete")) + .onClick(() => { + this.deleteWarn.deleteUserCertificate(this.deleteWarn.certInfo.uri); + this.mShowUserListPresenter.updateUserTrustedCertificateList(); + this.isShowWarnDialog = false; + this.controller.close() + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_warning")) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@CustomDialog +@Component +struct CustomDialogExampleUser { + controller: CustomDialogController; + @Link userInfoPresenter: CMShowUserCaPresenter; + @Link userInfoPresenterForAbstractList: CMShowUserCaPresenter; + @Link isShowWarnDialog: boolean; + @State IsOn: boolean = false; + + aboutToAppear() { + this.IsOn = this.userInfoPresenter.certInfo.status; + } + + build() { + Column() { + Text($r("app.string.CustomDialogExample_firText")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r("app.float.CustomDialogExample_firText_margin_left_value"), + top: $r("app.float.CustomDialogExample_firText_margin_top_value") + }) + .alignSelf(ItemAlign.Start) + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(this.userInfoPresenter.certInfo.certAlias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r("app.float.wh_value_26") + }) + if (this.IsOn) { + Text($r("app.string.CustomDialogExampleUser_Status_true")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_secondary")) + .margin({ + left: $r("app.float.wh_value_26") + }) + } else { + Text($r("app.string.CustomDialogExampleUser_Status_false")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_secondary")) + .margin({ + left: $r("app.float.wh_value_26") + }) + } + }.alignItems(HorizontalAlign.Start); + Toggle({ type: ToggleType.Switch, isOn: this.IsOn }) + .margin({ + right: $r("app.float.CustomDialogExampleUser_Flex_Toggle_margin_right_value") + }) + .width($r("app.float.CustomDialogExampleUser_Flex_Toggle_width_value")) + .height($r("app.float.CustomDialogExampleUser_Flex_Toggle_height_value")) + .selectedColor($r("app.color.CustomDialogExampleUser_Flex_Toggle_selectedColor_007DFF")) + .onChange((isOn: boolean) => { + if (isOn) { + this.IsOn = true; + this.userInfoPresenter.setUserCertificateStatus(this.userInfoPresenter.certInfo.uri, true); + } else { + this.IsOn = false; + this.userInfoPresenter.setUserCertificateStatus(this.userInfoPresenter.certInfo.uri, false); + } + }); + } + .height($r("app.float.CustomDialogExampleUser_Flex_height_value")) + .margin({}); + List() { + ListItem() { + Text($r("app.string.CustomDialogExample_firListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogSubjectComponent({ map: this.userInfoPresenter.certInfo.subjectNameMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_secListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogIssuerComponent({ map: this.userInfoPresenter.certInfo.issuerNameMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_thdListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogDateComponent({ map: this.userInfoPresenter.certInfo.dateMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_fouListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogFingerPrintComponent({ fingerprintSha256: this.userInfoPresenter.certInfo.fingerprintSha256 }); + }.width('100%').align(Alignment.Start) + } + .height($r("app.float.CustomDialogExample_list_height_value")) + .margin({ + bottom: $r("app.float.CustomDialogExample_secListItem_Text_margin_left_value"), + left: $r("app.float.wh_value_24"), + right: $r("app.float.wh_value_24") + }) + .borderRadius($r("app.float.CustomDialogExample_list_borderRadius_value")) + .scrollBar(BarState.Auto); + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.CustomDialogExampleUser_Flex_firButton_text")) + .onClick(() => { + this.userInfoPresenterForAbstractList.updateUserTrustedCertificateList(); + this.isShowWarnDialog = false; + this.controller.close(); + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + Button($r("app.string.CustomDialogExampleUser_Flex_secButton_text")) + .onClick(() => { + this.isShowWarnDialog = true; + this.controller.close(); + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_warning")) + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@CustomDialog +@Component +struct CustomDialogExampleSystem { + controller: CustomDialogController; + @Link sysInfoPresenter: CMShowSysCaPresenter; + private isTrueButton: string = ''; + + build() { + Column() { + Text($r("app.string.CustomDialogExample_firText")) + .fontSize($r("sys.float.ohos_id_text_size_dialog_tittle")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + left: $r("app.float.CustomDialogExample_firText_margin_left_value"), + top: $r("app.float.CustomDialogExample_firText_margin_top_value") + }) + .alignSelf(ItemAlign.Start) + Text(this.sysInfoPresenter.certInfo.certAlias) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .margin({ + top: $r("app.float.wh_value_16"), + left: $r("app.float.CustomDialogExample_secText_margin_left_value") + }) + .alignSelf(ItemAlign.Start) + List() { + ListItem() { + Text($r("app.string.CustomDialogExample_firListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogSubjectComponent({ map: this.sysInfoPresenter.certInfo.subjectNameMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_secListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogIssuerComponent({ map: this.sysInfoPresenter.certInfo.issuerNameMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_thdListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogDateComponent({ map: this.sysInfoPresenter.certInfo.dateMap }); + }.width('100%').align(Alignment.Start) + + ListItem() { + Text($r("app.string.CustomDialogExample_fouListItem_text")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .margin({ + top: $r("app.float.wh_value_12") + }) + }.width('100%').align(Alignment.Start) + + ListItem() { + DialogFingerPrintComponent({ fingerprintSha256: this.sysInfoPresenter.certInfo.fingerprintSha256 }); + }.width('100%').align(Alignment.Start) + } + .height($r("app.float.CustomDialogExample_list_height_value")) + .margin({ + left: $r("app.float.wh_value_24"), + top: $r("app.float.CustomDialogExample_list_margin_top_value"), + bottom: $r("app.float.CustomDialogExample_secListItem_Text_margin_left_value"), + right: $r("app.float.wh_value_24") + }) + .borderRadius($r("app.float.CustomDialogExample_list_borderRadius_value")) + .backgroundColor($r("app.color.CustomDialogExample_list_backgroundColor_FFFFFF")) + .scrollBar(BarState.Auto); + + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center, justifyContent: FlexAlign.SpaceAround }) { + Button($r("app.string.CustomDialogExample_Button_text")) + .onClick(() => { + this.controller.close(); + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + Divider() + .strokeWidth(ConfigData.VERTICAL_DIVIDER_WIDTH) + .color($r("sys.color.ohos_id_color_list_separator")) + .vertical(true) + .height($r('app.float.wh_value_40')) + .opacity($r("app.float.opacity_0_2")) + if (this.sysInfoPresenter.certInfo.status) { + Button($r("app.string.CustomDialogExample_Button_off")) + .onClick(() => { + this.sysInfoPresenter.setSystemCertificateStatus(this.sysInfoPresenter.certInfo.uri, false); + this.controller.close(); + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + } else { + Button($r("app.string.CustomDialogExample_Button_on")) + .onClick(() => { + this.sysInfoPresenter.setSystemCertificateStatus(this.sysInfoPresenter.certInfo.uri, true); + this.controller.close(); + }) + .backgroundColor($r("app.color.CustomDialogExample_Button_backgroundColor_FFFFFF")) + .fontSize($r("sys.float.ohos_id_text_size_button1")) + .width($r('app.float.wh_value_152')) + .height($r('app.float.wh_value_40')) + .fontColor($r("sys.color.ohos_id_color_text_hyperlink")) + } + } + .height($r('app.float.wh_value_64')) + .padding({ + bottom: $r('app.float.wh_value_16') + }) + .margin({ + top: $r('app.float.wh_value_16'), + left: $r('app.float.wh_value_24'), + right: $r('app.float.wh_value_24') + }) + } + } +} + +@Component +struct ComponentSystem { + private certAlias: string; + private subjectName: string; + private Status: boolean; + private Index : number; + private Uri: string; + isSwitchTouched : boolean = false; + @State isTouched: boolean = false; + @Link setStatus: CMShowSysCaPresenter; + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExampleSystem({ sysInfoPresenter: $setStatus }), + autoCancel: true, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + build() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(this.certAlias) + .height($r("app.float.ComponentSystem_firText_height_value")) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Start) + .margin({top: $r("app.float.wh_value_10") }); + Text(this.subjectName) + .height($r("app.float.ComponentSystem_secText_height_value")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_secondary")) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Start) + .margin({ top: $r("app.float.wh_value_2"), bottom: $r("app.float.wh_value_11") }); + }.alignItems(HorizontalAlign.Start); + Toggle({ type: ToggleType.Switch, isOn: this.setStatus.certList[this.Index].status }) + .width($r("app.float.ComponentSystem_Toggle_width_value")) + .height($r("app.float.ComponentSystem_Toggle_height_value")) + .selectedColor($r("app.color.ComponentSystem_Toggle_selectedColor_007DFF")) + .onChange((isOn: boolean) => { + if (isOn) { + console.info('Component status:' + isOn); + this.setStatus.setSystemCertificateStatus(this.Uri, true); + } else { + console.info('Component status:' + isOn); + this.setStatus.setSystemCertificateStatus(this.Uri, false); + } + }) + .offset({ x: ConfigData.SWITCH_BUTTON_X_OFFSET, y: 0 }) + } + .height($r("app.float.ComponentSystem_Flex_height_value")) + .borderRadius($r("app.float.ComponentSystem_Flex_borderRadius_value")) + .onClick(() => { + this.setStatus.getSystemTrustedCertificate(this.Uri); + console.info('this.setStatus.certInfo.status is:' + JSON.stringify(this.setStatus.certInfo)); + this.dialogController.open(); + }) + } +} + +@Component +struct ComponentUser { + private certAlias: string; + private subjectName: string; + private Index : number = -1; + private Uri: string; + @State StatusText : Resource = $r("app.string.CustomDialogExampleUser_Status_false"); + @State isTouched: boolean = false; + @Link setStatus: CMShowUserCaPresenter; + @State mUserCaPresenterDetail: CMShowUserCaPresenter = CMShowUserCaPresenter.getInstance(); + @State @Watch("onShowDeleteWarnDialog") isShowWarning: boolean = false; + + dialogController: CustomDialogController = new CustomDialogController({ + builder: CustomDialogExampleUser({ isShowWarnDialog: $isShowWarning,userInfoPresenter: $mUserCaPresenterDetail, + userInfoPresenterForAbstractList: $setStatus }), + autoCancel: true, + cancel: () => { + this.setStatus.updateUserTrustedCertificateList(); + }, + alignment: DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + deleteWarnDialog: CustomDialogController = new CustomDialogController({ + builder: CustomDialogDeleteWarning({ + isShowWarnDialog: $isShowWarning, + deleteWarn: $mUserCaPresenterDetail, + mShowUserListPresenter: $setStatus }), + autoCancel: false, + alignment:DialogAlignment.Bottom, + offset: { dx: 0, dy: ConfigData.DIALOG_DY_OFFSET } + }) + + onShowDeleteWarnDialog() { + if (this.isShowWarning == true) { + this.deleteWarnDialog.open(); + } else { + this.dialogController.close(); + this.deleteWarnDialog.close(); + } + } + + aboutToAppear() { + LogUtil.info('in ComponentUser aboutToAppear'); + if (this.setStatus.certList[this.Index].status == true) { + this.StatusText = $r("app.string.CustomDialogExampleUser_Status_true"); + } else { + this.StatusText = $r("app.string.CustomDialogExampleUser_Status_false"); + } + } + + build() { + Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { + Column() { + Text(this.certAlias) + .height($r("app.float.componentUser_firText_height_value")) + .fontSize($r("sys.float.ohos_id_text_size_body1")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Medium) + .textAlign(TextAlign.Start) + .margin({ top: $r("app.float.wh_value_10") }); + Text(this.subjectName) + .height($r("app.float.componentUser_secText_height_value")) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_primary")) + .fontWeight(FontWeight.Regular) + .textAlign(TextAlign.Start) + .margin({ top: $r("app.float.wh_value_2"), bottom: $r("app.float.wh_value_11") }); + }.alignItems(HorizontalAlign.Start); + Row() { + Text(this.StatusText) + .fontSize($r("sys.float.ohos_id_text_size_body2")) + .fontColor($r("sys.color.ohos_id_color_text_secondary")) + .textAlign(TextAlign.End) + .margin({ + right: $r("app.float.componentUser_thdText_margin_value") + }) + Image($r('app.media.ic_settings_arrow')) + .width($r("app.float.componentUser_image_width_value")) + .height($r("app.float.componentUser_image_height_value")) + .fillColor($r("sys.color.ohos_id_color_primary")) + .opacity($r("app.float.componentUser_image_opacity_value")); + } + } + .height($r("app.float.componentUser_flex_height_value")) + .borderRadius($r("app.float.componentUser_flex_borderRadius_value")) + .onClick(() => { + this.mUserCaPresenterDetail.getUserTrustedCertificate(this.Uri); + console.info('userCerInfo is:' + JSON.stringify(this.setStatus.certInfo)); + this.dialogController.open(); + }); + } +} + +@Entry +@Component +struct TrustedEvidence { + @State mShowSysCaPresenter: CMShowSysCaPresenter = CMShowSysCaPresenter.getInstance(); + @State mShowUserCaPresenter: CMShowUserCaPresenter = CMShowUserCaPresenter.getInstance(); + @State mFaPresenter: CMFaPresenter = CMFaPresenter.getInstance(); + @State isTouched: boolean = false; + @State currentIndex: number = 0 + @State fontColor: Resource = $r("app.color.TrustedEvidence_TabBuilder_fontColor_182431") + @State selectedFontColor: Resource = $r("app.color.font_color_007DFF") + private controller: TabsController = new TabsController(); + + @Builder TabBuilder(index: number) { + Column() { + Text(index == 0 ? $r('app.string.system') : $r('app.string.user')) + .fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor) + .fontSize($r('app.float.TrustedEvidence_TabBuilder_Text_fontSize_value')) + .fontWeight(this.currentIndex === index ? FontWeight.Medium : FontWeight.Regular) + .alignSelf(ItemAlign.Center) + .margin({ + top: $r('app.float.TrustedEvidence_TabBuilder_Text_padding_top_value') + }) + if (this.currentIndex === index) { + Divider() + .width($r('app.float.TrustedEvidence_TabBuilder_Divider_width_value')) + .margin({ top: $r('app.float.TrustedEvidence_TabBuilder_Divider_padding_top_value') }) + .strokeWidth(2) + .color(this.selectedFontColor) + .alignSelf(ItemAlign.Center) + } + } + .width(ConfigData.WH_100_100) + } + + aboutToAppear() { + LogUtil.info('in aboutToAppear'); + this.mShowSysCaPresenter.updateSystemTrustedCertificateList(); + this.mShowUserCaPresenter.updateUserTrustedCertificateList(); + } + + onPageShow() { + let uri = globalThis.abilityWant.uri; + globalThis.abilityWant.uri = ""; + + if (uri === "certInstall") { + this.mFaPresenter.startInstall(); + } else if (uri === "requestAuthorize") { + this.mFaPresenter.startRequestAuth(globalThis.abilityWant.parameters.appUid); + } + } + + build() { + Column() { + GridContainer({columns:12, sizeType: SizeType.Auto, gutter: vp2px(1) === 2 ? '12vp' : '0vp', + margin: vp2px(1) === 2 ? '24vp' : '0vp'}) { + Row() { + Column() { + HeadComponent({ headName: $r('app.string.trustedEvidence') }) + Column() { + Tabs({ barPosition: BarPosition.Start, index: 0, controller: this.controller }) { + TabContent() { + List() { + ForEach(this.mShowSysCaPresenter.certList, (item, index) => { + ListItem() { + ComponentSystem({ certAlias: item.certAlias, subjectName: item.SubjectNameCN, Status: item.status, + Uri: item.uri, setStatus: $mShowSysCaPresenter, Index: index }) + } + }, item => JSON.stringify(item)) + } + .margin({ + left: $r("app.float.wh_value_12"), + right: $r("app.float.wh_value_12") + }) + .padding({ + left: $r("app.float.wh_value_12"), + top: $r("app.float.wh_value_4"), + bottom: $r("app.float.wh_value_4") + }) + .divider({ + strokeWidth: $r("app.float.sys_list_divider_strokeWidth_value"), + color: $r("app.color.sys_list_divider_color_000000"), + endMargin: '12vp' + }) + .borderRadius($r("sys.float.ohos_id_corner_radius_default_l")) + .backgroundColor($r("app.color.sys_list_backgroundColor_FFFFFF")) + .visibility(this.mShowSysCaPresenter.certList.length > 0 ? Visibility.Visible : Visibility.None); + } + .tabBar(this.TabBuilder(0)) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }); + + TabContent() { + List() { + ForEach(this.mShowUserCaPresenter.certList, (item, index) => { + ListItem() { + ComponentUser({ certAlias: item.certAlias, subjectName: item.SubjectNameCN, Uri: item.uri, + setStatus: $mShowUserCaPresenter, Index: index }) + } + }, item => JSON.stringify(item)) + } + .margin({ + left: $r("app.float.wh_value_12"), + right: $r("app.float.wh_value_12") + }) + .padding({ + left: $r("app.float.wh_value_12"), + right: $r("app.float.wh_value_8"), + top: $r("app.float.wh_value_4"), + bottom: $r("app.float.wh_value_4") + }) + .divider({ + strokeWidth: $r("app.float.user_list_divider_strokeWidth_value"), + color: $r("app.color.user_list_divider_color_000000"), + endMargin: '3vp' + }) + .borderRadius($r("app.float.user_list_divider_borderRadius_value")) + .backgroundColor($r("app.color.user_list_backgroundColor_FFFFFF")) + .visibility(this.mShowUserCaPresenter.certList.length > 0 ? Visibility.Visible : Visibility.None) + } + .tabBar(this.TabBuilder(1)) + .onTouch((event: TouchEvent) => { + if (event.type === TouchType.Down) { + this.isTouched = true; + } + if (event.type === TouchType.Up) { + this.isTouched = false; + } + }); + } + .vertical(false) + .scrollable(true) + .barMode(BarMode.Fixed) + .barWidth($r("app.float.tabs_barWidth_value")) + .barHeight($r("app.float.tabs_barHeight_value")) + .animationDuration(400) + .width(ConfigData.WH_100_100) + .backgroundColor($r("app.color.TrustedEvidence_tabs_backgroundColor_F1F3F5")) + .onChange((index: number) => { + this.currentIndex = index + }); + } + .height(ConfigData.WH_94_100) + .width(ConfigData.WH_100_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 12, offset: 0 }, sm: { span: 12, offset: 0 }, + md: { span: 12, offset: 0 }, lg: { span: 8, offset: 2 } + }); + + Column() { + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100) + .useSizeType({ + xs: { span: 0, offset: 12 }, sm: { span: 0, offset: 12 }, + md: { span: 0, offset: 12 }, lg: { span: 2, offset: 10 } + }); + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } + .backgroundColor($r("sys.color.ohos_id_color_sub_background")) + .width(ConfigData.WH_100_100) + .height(ConfigData.WH_100_100); + } +} diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMAppCredAuthPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMAppCredAuthPresenter.ets new file mode 100644 index 0000000..e8b22b8 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMAppCredAuthPresenter.ets @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel'; +import BundleModel from '../model/BundleModel'; +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel'; +import { CredentialAbstractVo } from '../model/CertManagerVo/CredentialAbstractVo'; +import router from '@system.router'; + +const TAG = "CMAppCredAuthPresenter Presenter: "; +const SUCCESS = 0; +const FAIL = -1; + +export default class CMAppCredAuthPresenter { + private static sInstance: CMAppCredAuthPresenter; + optType: CMModelOptType = CMModelOptType.CM_MODEL_OPT_UNKNOWN; + credList: CredentialAbstractVo[] = []; + appName: string = ''; + + public static getInstance(): CMAppCredAuthPresenter { + if (CMAppCredAuthPresenter.sInstance == null) { + CMAppCredAuthPresenter.sInstance = new CMAppCredAuthPresenter(); + } + return CMAppCredAuthPresenter.sInstance; + } + + onAboutToAppear() { + + } + + aboutToDisappear() { + this.optType = CMModelOptType.CM_MODEL_OPT_UNKNOWN; + this.credList = []; + } + + UpdateAppNameFromUid(uid) { + console.log("getAppNameFromUid start uid = " + uid); + BundleModel.getAppInfoList(uid, (errCode, appInfo) => { + console.log("getAppNameFromUid success, appInfo = " + appInfo); + if (!errCode) { + this.appName = appInfo.AppName; + } else { + console.log("getAppNameFromUid fail, uid = " + uid); + } + }) + } + + updateAppCredList() { + certManagerModel.getCertOrCredList(CMModelOptType.CM_MODEL_OPT_APP_CRED, (errCode, credList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.credList = credList; + console.log("updateSystemTrustedCertificateList inin :" + JSON.stringify(credList)); + } else { + console.log("updateSystemTrustedCertificateList fail"); + } + }); + } + + requestAuthorize(uri, appUid) { + console.log(TAG + "requestAuthorize start uri :" + uri + "appUid: " + appUid); + let want = globalThis.abilityWant; + + certManagerModel.setAppAuth(CMModelOptType.CM_MODEL_OPT_APP_CRED, uri, appUid, + true, (errCode, data) => { + router.clear(); + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.log("requestAuthorize success data: " + data); + want.parameters.authUri = data; + globalThis.certManagerAbilityContext.terminateSelfWithResult({ + resultCode: SUCCESS, + want: want + }); + } else { + console.log("requestAuthorize fail"); + globalThis.certManagerAbilityContext.terminateSelfWithResult({ + resultCode: FAIL, + want: want + }); + } + }); + } + + cancelProcess() { + console.log("cancelProcess start"); + router.clear(); + globalThis.certManagerAbilityContext.terminateSelfWithResult({ + resultCode: FAIL, + want: globalThis.abilityWant + }); + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMFaPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMFaPresenter.ets new file mode 100644 index 0000000..f218e66 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMFaPresenter.ets @@ -0,0 +1,125 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import router from '@system.router'; +import certManagerModel from '../model/CertMangerModel' +import FileIoModel from '../model/FileIoModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' + +const TAG = "CMFaPresenter: "; +const PAGE_URI_PWD_INPUT = 'pages/certPwdInput'; +const PAGE_URI_ALIAS_INPUT = 'pages/certInstallAliasInput'; + +export default class CMFaPresenter { + private static sInstance: CMFaPresenter; + + public static getInstance(): CMFaPresenter { + if (CMFaPresenter.sInstance == null) { + CMFaPresenter.sInstance = new CMFaPresenter(); + } + return CMFaPresenter.sInstance; + } + + onAboutToAppear() { + + } + + aboutToDisappear() { + } + + routeToNext(fileUri: string) { + console.info(TAG + 'routeToNext fileUri: ' + fileUri); + FileIoModel.getMediaFileSuffix(fileUri, (suffix) => { + if (suffix) { + if ((suffix == "cer") || (suffix == "pem")) { + router.push({ + uri: PAGE_URI_ALIAS_INPUT, + params: { + uri: fileUri, + suffix: suffix + } + }); + } else { + router.push({ + uri: PAGE_URI_PWD_INPUT, + params: { + uri: fileUri, + suffix: suffix + } + }); + } + } + }) + } + + requestPermissions() { + let permissionList: Array = [ + "ohos.permission.READ_MEDIA" + ] + globalThis.certManagerAbilityContext.requestPermissionsFromUser(permissionList, (data) => { + console.log("requestPermissions finish"); + this.startInstall(); + }) + } + + startInstall() { + globalThis.certManagerAbilityContext.startAbilityForResult( + { + bundleName: "com.ohos.filepicker", + abilityName: "MainAbility", + parameters: { + 'startMode': 'choose', + } + }, + { + windowMode: 102 + } + ) + .then((data) => { + if (!data.resultCode) { + this.routeToNext(data.want.parameters.result) + } + }) + .catch((error) => { + console.log(TAG + 'start filePicker err: ' + error); + }) + } + + startRequestAuth(uri) { + router.replace({ + uri: "pages/requestAuth", params: { + appUid: uri, + } + }) + } + + uninstallAllCert() { + certManagerModel.delAllCertOrCred(CMModelOptType.CM_MODEL_OPT_USER_CA, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.log(TAG + 'uninstallAllCert CM_MODEL_OPT_USER_CA success'); + } else { + console.log(TAG + 'uninstallAllCert CM_MODEL_OPT_USER_CA failed'); + } + }); + + certManagerModel.delAllCertOrCred(CMModelOptType.CM_MODEL_OPT_APP_CRED, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.log(TAG + 'uninstallAllCert CM_MODEL_OPT_APP_CRED success'); + } else { + console.log(TAG + 'uninstallAllCert CM_MODEL_OPT_APP_CRED failed'); + } + }); + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMInstallPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMInstallPresenter.ets new file mode 100644 index 0000000..df71e65 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMInstallPresenter.ets @@ -0,0 +1,73 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel' +import FileIoModel from '../model/FileIoModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' +import router from '@system.router'; + +const TAG = "CMInstallPresenter: "; + +export default class CMInstallPresenter { + private static sInstance: CMInstallPresenter; + optType: CMModelOptType = CMModelOptType.CM_MODEL_OPT_UNKNOWN; + + public static getInstance(): CMInstallPresenter { + if (CMInstallPresenter.sInstance == null) { + CMInstallPresenter.sInstance = new CMInstallPresenter(); + } + return CMInstallPresenter.sInstance; + } + + onAboutToAppear() { + + } + + aboutToDisappear() { + this.optType = CMModelOptType.CM_MODEL_OPT_UNKNOWN; + } + + updateCertFileType(suffix) { + console.info(TAG + 'updateCertFileType suffix: ' + suffix) + if ((suffix == "cer") || (suffix == "pem")) { + this.optType = CMModelOptType.CM_MODEL_OPT_USER_CA; + } else if ((suffix == "p12") || (suffix == "jks") || (suffix == "pfx")) { + this.optType = CMModelOptType.CM_MODEL_OPT_APP_CRED; + } + } + + getFileDataFromUri(uri, callback) { + FileIoModel.getMediaFileData(uri, (data) => { + callback(data) + }) + + } + + installCert(uri, alias, suffix) { + this.updateCertFileType(suffix); + this.getFileDataFromUri(uri, (data) => { + certManagerModel.installCertOrCred(this.optType, alias, data, globalThis.PwdStore.getCertPwd(), (errCode) => { + console.info(TAG + 'installCertOrCred result: ' + JSON.stringify(errCode)) + globalThis.PwdStore.clearCertPwd(); + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.info(TAG + 'installCert success'); + } else { + console.info(TAG + 'installCert failed'); + } + router.replace({ uri: "pages/certManagerFa" }); + }); + }) + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMShowAppCredPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMShowAppCredPresenter.ets new file mode 100644 index 0000000..80f6266 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMShowAppCredPresenter.ets @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel' +import bundleModel from '../model/BundleModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' +import { CredentialAbstractVo } from '../model/CertManagerVo/CredentialAbstractVo' +import { CredentialVo } from '../model/CertManagerVo/CredentialVo' +import { AppAuthorVo } from '../model/CertManagerVo/AppAuthorVo' + +export default class CMShowAppCredPresenter { + private static sInstance: CMShowAppCredPresenter; + credList: CredentialAbstractVo[] = []; + appInfoList: AppAuthorVo[] = []; + credInfo: CredentialVo = new CredentialVo("", "", "", 0, 0, null); + + public static getInstance(): CMShowAppCredPresenter { + if (CMShowAppCredPresenter.sInstance == null) { + CMShowAppCredPresenter.sInstance = new CMShowAppCredPresenter(); + } + return CMShowAppCredPresenter.sInstance; + } + + aboutToDisappear() { + this.credList = []; + this.credInfo = new CredentialVo("", "", "", 0, 0, null); + this.appInfoList = [] + } + + updateAppCredList() { + certManagerModel.getCertOrCredList(CMModelOptType.CM_MODEL_OPT_APP_CRED, (errCode, credList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + credList.sort((certAbs, certAbsOther) => { + let certAlias = certAbs.alias + let certAliasOther = certAbsOther.alias + if (certAlias <= certAliasOther) { + return -1 + } else { + return 1 + } + }) + this.credList = credList; + } else { + console.log("updateAppCredList error :" + JSON.stringify(errCode)); + this.credList = [] + } + }); + } + + getAppCred(uri) { + certManagerModel.getCertOrCred(CMModelOptType.CM_MODEL_OPT_APP_CRED, uri, (errCode, credInfo) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.credInfo = credInfo + } else { + console.log("getAppCred error :" + JSON.stringify(errCode)); + this.credInfo.clearCredentialVo(); + } + }); + } + + deleteAppCred(uri) { + certManagerModel.deleteCertOrCred(CMModelOptType.CM_MODEL_OPT_APP_CRED, uri, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.updateAppCredList(); + } else { + console.log("deleteAppCred error :" + JSON.stringify(errCode)); + } + }) + } + + getAuthorizedAppList(uri) { + this.appInfoList = [] + certManagerModel.getAuthAppList(CMModelOptType.CM_MODEL_OPT_APP_CRED, uri, (errCode, appUidList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + for (let i = 0; i < appUidList.length; i++) { + bundleModel.getAppInfoList(Number(appUidList[i]),(errCode,AppInfo) => { + if (errCode == CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.appInfoList.push(new AppAuthorVo(AppInfo.AppImage,appUidList[i], String(AppInfo.AppName), true)) + console.log("appInfoList: " + JSON.stringify(this.appInfoList)); + } + }) + } + } else { + console.log("getAuthorizedAppList error :" + JSON.stringify(errCode)); + this.appInfoList = []; + } + }) + } + + removeGrantedAppList(uri) { + for (let i = 0; i < this.appInfoList.length; i++) { + if (!this.appInfoList[i].status) { + certManagerModel.setAppAuth(CMModelOptType.CM_MODEL_OPT_APP_CRED, uri, this.appInfoList[i].uid, false, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.log("removeGrantedAppList succeed" + JSON.stringify(errCode)); + } else { + console.log("removeGrantedAppList error :" + JSON.stringify(errCode)); + } + }) + } + } + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMShowPrivateCredPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMShowPrivateCredPresenter.ets new file mode 100644 index 0000000..fb0aae0 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMShowPrivateCredPresenter.ets @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' +import { CredentialAbstractVo } from '../model/CertManagerVo/CredentialAbstractVo' +import { CredentialVo } from '../model/CertManagerVo/CredentialVo' + +export default class CMShowPrivateCredPresenter { + private static sInstance: CMShowPrivateCredPresenter; + credList: CredentialAbstractVo[] = []; + credInfo: CredentialVo = new CredentialVo("", "", "", 0, 0, null); + + public static getInstance(): CMShowPrivateCredPresenter { + if (CMShowPrivateCredPresenter.sInstance == null) { + CMShowPrivateCredPresenter.sInstance = new CMShowPrivateCredPresenter(); + } + return CMShowPrivateCredPresenter.sInstance; + } + + aboutToDisappear() { + this.credList = []; + this.credInfo = new CredentialVo("", "", "", 0, 0, null); + } + + updatePrivateCredList() { + certManagerModel.getCertOrCredList(CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED, (errCode, credList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + credList.sort((certAbs, certAbsOther) => { + let certAlias = certAbs.alias + let certAliasOther = certAbsOther.alias + if (certAlias <= certAliasOther) { + return -1 + } else { + return 1 + } + }) + this.credList = credList; + } else { + console.log("updatePrivateCredList error :" + JSON.stringify(errCode)); + this.credList = []; + } + }); + } + + getPrivateCred(uri) { + certManagerModel.getCertOrCred(CMModelOptType.CM_MODEL_OPT_PRIVATE_CRED, uri, (errCode, credInfo) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.credInfo = credInfo + } else { + console.log("getPrivateCred error :" + JSON.stringify(errCode)); + this.credInfo.clearCredentialVo(); + } + }); + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMShowSysCaPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMShowSysCaPresenter.ets new file mode 100644 index 0000000..7346572 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMShowSysCaPresenter.ets @@ -0,0 +1,88 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' +import { CertAbstractVo } from '../model/CertManagerVo/CertAbstractVo' +import { CertInfoVo } from '../model/CertManagerVo/CertInfoVo' + +const TAG = "CMShowSysCa Presenter: "; + +export default class CMShowSysCaPresenter { + private static sInstance: CMShowSysCaPresenter; + certList: CertAbstractVo[] = []; + certInfo: CertInfoVo = new CertInfoVo("", "", false, "", "", "", "", "", "", null, null, null, null); + + public static getInstance(): CMShowSysCaPresenter { + if (CMShowSysCaPresenter.sInstance == null) { + CMShowSysCaPresenter.sInstance = new CMShowSysCaPresenter(); + } + return CMShowSysCaPresenter.sInstance; + } + + onAboutToAppear() { + this.updateSystemTrustedCertificateList(); + } + + aboutToDisappear() { + this.certList = []; + this.certInfo = new CertInfoVo("", "", false, "", "", "", "", "", "", null, null, null, null); + } + + updateSystemTrustedCertificateList() { + certManagerModel.getCertOrCredList(CMModelOptType.CM_MODEL_OPT_SYSTEM_CA, (errCode, certList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + certList.sort((certAbs, certAbsOther) => { + let certAlias = certAbs.certAlias + let certAliasOther = certAbsOther.certAlias + if (certAlias <= certAliasOther) { + return -1 + } else { + return 1 + } + }) + this.certList = certList; + console.log("updateSystemTrustedCertificateList inin :" + JSON.stringify(certList)); + } else { + console.info(TAG + 'updateSystemTrustedCertificateList fail,errCode is' + errCode); + this.certList = []; + } + }); + } + + getSystemTrustedCertificate(uri) { + certManagerModel.getCertOrCred(CMModelOptType.CM_MODEL_OPT_SYSTEM_CA, uri, (errCode, certInfo) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.info(TAG + 'getSystemTrustedCertificate success,errCode is ' + errCode + ' certInfo is' + + JSON.stringify(certInfo)); + this.certInfo = certInfo; + } else { + console.info(TAG + 'getSystemTrustedCertificate fail,errCode is' + errCode); + this.certInfo.clearCertInfoVo(); + } + }); + } + + setSystemCertificateStatus(uri, status) { + certManagerModel.setCertStatus(CMModelOptType.CM_MODEL_OPT_SYSTEM_CA, uri, status, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.info(TAG + 'setSystemCertificateStatus success,errCode is' + errCode); + this.updateSystemTrustedCertificateList(); + } else { + console.info(TAG + 'setSystemCertificateStatus fail,errCode is' + errCode); + } + }) + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/presenter/CMShowUserCaPresenter.ets b/CertificateManager/product/phone/src/main/ets/presenter/CMShowUserCaPresenter.ets new file mode 100644 index 0000000..eb34040 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/presenter/CMShowUserCaPresenter.ets @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import certManagerModel from '../model/CertMangerModel' +import { CMModelErrorCode, CMModelOptType } from '../model/CertMangerModel' +import { CertAbstractVo } from '../model/CertManagerVo/CertAbstractVo' +import { CertInfoVo } from '../model/CertManagerVo/CertInfoVo' + +const TAG = "CMFaShowUserCa Presenter: "; + +export default class CMShowUserCaPresenter { + private static sInstance: CMShowUserCaPresenter; + certList: CertAbstractVo[] = []; + certInfo: CertInfoVo = new CertInfoVo("", "", false, "", "", "", "", "", "", null, null, null, null); + + public static getInstance(): CMShowUserCaPresenter { + if (CMShowUserCaPresenter.sInstance == null) { + CMShowUserCaPresenter.sInstance = new CMShowUserCaPresenter(); + } + return CMShowUserCaPresenter.sInstance; + } + + onAboutToAppear() { + + } + + aboutToDisappear() { + this.certList = []; + this.certInfo = new CertInfoVo("", "", false, "", "", "", "", "", "", null, null, null, null); + } + + updateUserTrustedCertificateList() { + certManagerModel.getCertOrCredList(CMModelOptType.CM_MODEL_OPT_USER_CA, (errCode, certList) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + certList.sort((certAbs, certAbsOther) => { + let certAlias = certAbs.certAlias + let certAliasOther = certAbsOther.certAlias + if (certAlias <= certAliasOther) { + return -1 + } else { + return 1 + } + }) + this.certList = certList; + console.log("updateUserTrustedCertificateList inin :" + JSON.stringify(certList)); + } else { + console.info(TAG + 'updateUserTrustedCertificateList fail,errCode is ' + errCode); + this.certList = []; + } + }); + } + + getUserTrustedCertificate(uri) { + certManagerModel.getCertOrCred(CMModelOptType.CM_MODEL_OPT_USER_CA, uri, (errCode, certInfo) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + console.info(TAG + 'getUserTrustedCertificate success, errCode is ' + errCode + ' certInfo is' + + JSON.stringify(certInfo)); + this.certInfo = certInfo; + } else { + console.info(TAG + 'getUserTrustedCertificate fail, errCode is ' + errCode); + this.certInfo.clearCertInfoVo(); + } + }); + } + + setUserCertificateStatus(uri, status) { + certManagerModel.setCertStatus(CMModelOptType.CM_MODEL_OPT_USER_CA, uri, status, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.getUserTrustedCertificate(uri); + } else { + console.info(TAG + 'setUserCertificateStatus fail,errCode is ' + errCode) + } + }) + } + + deleteUserCertificate(uri) { + certManagerModel.deleteCertOrCred(CMModelOptType.CM_MODEL_OPT_USER_CA, uri, (errCode) => { + if (errCode === CMModelErrorCode.CM_MODEL_ERROR_SUCCESS) { + this.updateUserTrustedCertificateList(); + } else { + console.info(TAG + 'deleteUserCertificate fail,errCode is ' + errCode); + } + }) + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/stub/certStubPromise.ts b/CertificateManager/product/phone/src/main/ets/stub/certStubPromise.ts new file mode 100644 index 0000000..3834a70 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/stub/certStubPromise.ts @@ -0,0 +1,652 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CMResult, BusinessError, CMErrorCode, CMBlob, CMSignatureSpec, CertManagerStore } from './certStubStruct'; +import certStubUtil from './certStubUtil'; +import fileio from '@ohos.fileio'; + +var certUtil = new certStubUtil(); +const TAG = "CertManager Stub: "; +const certNum = 10 +const keyNum = 20 +const authorListA = ["20010027", "20010026", "10003", "20010013","20010033"] +const authorListB = ["20010033", "10003", "20010027"] +const authorListC = ["20010032", "20010013", "20010026", "10003"] + +export class CertStubPromise { + exceptFlag = 0; + uriBase = "uri://stub/certFile/" + type = "CM_URI_TYPE_APP_KEY" + uriCount = 0; + systemCertMap = new Map(); + userCertMap = new Map(); + uriToAlias = new Map(); + appCredMap = new Map(); + privateCredMap = new Map(); + uriToAppList = new Map(); + + constructor() { + let newCert; + + console.log(TAG + "getSystemTrustedCertificateList stub constructor start"); + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "SystemRoot_1", true, new Uint8Array([0, 1, 2, 42, 100, 101, 102, 255])); + this.systemCertMap.set(this.uriBase + this.uriCount.toString(), newCert); + this.uriCount++; + + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "SystemRoot_2", false, new Uint8Array([64, 1, 2, 42, 100, 123, 321, 255])); + this.systemCertMap.set(this.uriBase + this.uriCount.toString(), newCert); + this.uriCount++; + + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "SystemRoot_3", true, new Uint8Array([54, 1, 123, 42, 100, 101, 102, 23])); + this.systemCertMap.set(this.uriBase + this.uriCount.toString(), newCert); + this.uriCount++; + + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "UserRoot_1", true, new Uint8Array([0, 1, 2, 42, 100, 101, 102, 255])); + this.userCertMap.set("UserRoot_1", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "UserRoot_1") + this.uriCount++; + + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "UserRoot_2", false, new Uint8Array([0, 1, 2, 42, 100, 101, 102, 255])); + this.userCertMap.set("UserRoot_2", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "UserRoot_2") + this.uriCount++; + + newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + "UserRoot_3", true, new Uint8Array([0, 1, 2, 42, 100, 101, 102, 255])); + this.userCertMap.set("UserRoot_3", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "UserRoot_3") + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "TheEncryptionForCCMPV1", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([25, 5, 34, 45, 64, 78, 7, 8])); + this.appCredMap.set("ApptemRoot_1", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "ApptemRoot_1") + this.uriToAppList.set(this.uriBase + this.uriCount.toString(), authorListA) + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "TheEncryptionForCCMPV2", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([23, 1, 43, 42, 78, 90, 56, 12])); + this.appCredMap.set("ApptemRoot_2", newCert); + this.uriToAppList.set(this.uriBase + this.uriCount.toString(), authorListB) + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "ApptemRoot_2") + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "TheEncryptionForCCMPV3", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([21, 1, 32, 645, 100, 101, 102, 23])); + this.appCredMap.set("ApptemRoot_3", newCert); + this.uriToAppList.set(this.uriBase + this.uriCount.toString(), authorListC) + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "ApptemRoot_3") + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "Employee_WPA_EAPIEA", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([32, 41, 54, 67, 77, 98, 91, 123])); + this.privateCredMap.set("PrivatetemRoot_1", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "PrivatetemRoot_1") + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "Employee_WPA_EAPIEB", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([34, 65, 67, 68, 33, 77, 14, 18])); + this.privateCredMap.set("PrivatetemRoot_2", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "PrivatetemRoot_2") + this.uriCount++; + + newCert = certUtil.parseCredential(this.type, "Employee_WPA_EAPIEC", this.uriBase + this.uriCount.toString(), certNum, keyNum, + new Uint8Array([12, 3, 54, 76, 8, 123, 43, 55])); + this.privateCredMap.set("PrivatetemRoot_3", newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), "PrivatetemRoot_3") + this.uriCount++; + } + + getSystemTrustedCertificateList() { + return new Promise((resolve, reject) => { + let error: BusinessError; + let data: CMResult; + let certList = new Array(); + + if (!this.exceptFlag) { + console.log(TAG + "getSystemTrustedCertificateList stub start"); + this.systemCertMap.forEach((data, keyUri) => { + certList.push(this.systemCertMap.get(keyUri)) + }) + data = { + certList: certList + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_FAILURE, + }; + reject(error); + } + }) + } + + getSystemTrustedCertificate(certUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + let error: BusinessError; + + if (this.systemCertMap.has(certUri)) { + data = { + certInfo: this.systemCertMap.get(certUri) + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + }) + } + + setCertificateStatus(certUri: string, store: number, status: boolean) { + return new Promise((resolve, reject) => { + let error: BusinessError; + let alias; + + if ((!this.systemCertMap.has(certUri)) && + (!this.uriToAlias.has(certUri))) { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + if (store == CertManagerStore.CERT_MANAGER_SYSTEM_TRUSTED_STORE) { + this.systemCertMap.get(certUri).status = status; + resolve(); + } else if (store == CertManagerStore.CERT_MANAGER_USER_TRUSTED_STORE) { + alias = this.uriToAlias.get(certUri); + this.userCertMap.get(alias).status = status; + resolve(); + } else { + error = { + code: CMErrorCode.CMR_ERROR_NOT_SUPPORTED, + }; + reject(error); + } + }) + } + + installUserTrustedCertificate(certificate: CMBlob) { + return new Promise((resolve, reject) => { + let newCert = certUtil.parseCertInfo(this.uriBase + this.uriCount.toString(), + certificate.alias, true, certificate.inData); + this.userCertMap.set(certificate.alias, newCert); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), certificate.alias) + this.uriCount++; + + resolve(); + }) + } + + uninstallAllUserTrustedCertificate() { + return new Promise((resolve, reject) => { + console.log(TAG + "uninstallAllUserTrustedCertificate stub in"); + this.userCertMap.clear(); + this.uriToAlias.clear(); + resolve(); + }) + } + + uninstallUserTrustedCertificate(certUri: string) { + return new Promise((resolve, reject) => { + let error: BusinessError; + let alias; + + if (!this.uriToAlias.has(certUri)) { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + alias = this.uriToAlias.get(certUri); + this.uriToAlias.delete(certUri); + this.userCertMap.delete(alias); + resolve(); + }) + } + + getUserTrustedCertificateList() { + return new Promise((resolve, reject) => { + let error: BusinessError; + let data: CMResult; + let certList = new Array(); + + if (!this.exceptFlag) { + this.userCertMap.forEach((data, keyAlias) => { + certList.push(this.userCertMap.get(keyAlias)) + }) + + data = { + certList: certList + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_FAILURE, + }; + reject(error); + } + }) + } + + getUserTrustedCertificate(certUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + let error: BusinessError; + + if (this.uriToAlias.has(certUri)) { + let alias = this.uriToAlias.get(certUri); + data = { + certInfo: this.userCertMap.get(alias) + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + }) + } + + installAppCertificate(keystore: Uint8Array, keystorePwd: string, certAlias: string) { + return new Promise((resolve, reject) => { + let newCred = certUtil.parseCredential(this.type, certAlias, this.uriBase + this.uriCount.toString(), + certNum, keyNum, keystore); + this.appCredMap.set(certAlias, newCred); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), certAlias) + this.uriCount++; + + resolve(); + }) + } + + installPrivateCertificate(keystore: Uint8Array, keystorePwd: string, certAlias: string) { + return new Promise((resolve, reject) => { + let newCred = certUtil.parseCredential("privateCred", certAlias, this.uriBase + this.uriCount.toString(), + 1, 1, keystore); + this.privateCredMap.set(certAlias, newCred); + this.uriToAlias.set(this.uriBase + this.uriCount.toString(), certAlias); + this.uriCount++; + + resolve(); + }) + } + + uninstallAllAppCertificate() { + return new Promise((resolve, reject) => { + console.log(TAG + "uninstallAllAppCertificate stub in"); + this.appCredMap.clear(); + this.privateCredMap.clear(); + + resolve(); + }) + } + + uninstallAppCertificate(keyUri: string) { + return new Promise((resolve, reject) => { + let alias; + let error: BusinessError; + + if (!this.uriToAlias.has(keyUri)) { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + alias = this.uriToAlias.get(keyUri); + this.uriToAlias.delete(keyUri); + this.appCredMap.delete(alias); + + resolve(); + }) + } + + uninstallPrivateCertificate(keyUri) { + return new Promise((resolve, reject) => { + let alias; + let error: BusinessError; + + if (!this.uriToAlias.has(keyUri)) { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + alias = this.uriToAlias.get(keyUri); + this.uriToAlias.delete(keyUri); + this.privateCredMap.delete(alias); + + resolve(); + }) + } + + getAppCertificateList() { + return new Promise((resolve, reject) => { + let error: BusinessError; + let data: CMResult; + let credList = new Array(); + + if (!this.exceptFlag) { + this.appCredMap.forEach((data, keyAlias) => { + credList.push(this.appCredMap.get(keyAlias)) + }) + + data = { + credentialList: credList + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_FAILURE, + }; + reject(error); + } + }) + } + + getPrivateCertificateList() { + return new Promise((resolve, reject) => { + let error: BusinessError; + let data: CMResult; + let credList = new Array(); + + if (!this.exceptFlag) { + this.privateCredMap.forEach((data, keyAlias) => { + credList.push(this.privateCredMap.get(keyAlias)) + }) + + data = { + credentialList: credList + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_FAILURE, + }; + reject(error); + } + }) + } + + getAppCertificate(keyUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + let error: BusinessError; + + if (this.uriToAlias.has(keyUri)) { + let alias = this.uriToAlias.get(keyUri); + data = { + credential: this.appCredMap.get(alias) + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + }) + } + + getPrivateCertificate(keyUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + let error: BusinessError; + + if (this.uriToAlias.has(keyUri)) { + let alias = this.uriToAlias.get(keyUri); + data = { + credential: this.privateCredMap.get(alias) + }; + resolve(data); + } else { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + }) + } + + grantAppCertificate(keyUri: string, clientAppUid: string) { + return new Promise((resolve, reject) => { + let appList: Array; + let data: CMResult; + let error: BusinessError; + + console.log(TAG + "grantAppCertificate stub uri: " + keyUri + " clientAppUid: " + clientAppUid); + if (!this.uriToAlias.has(keyUri)) { + error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + if (this.uriToAppList.has(keyUri)) { + appList = this.uriToAppList.get(keyUri); + } else { + appList = new Array(); + } + + appList.push(clientAppUid); + this.uriToAppList.set(keyUri, appList) + data = { + authUri: "authUri-value" + }; + console.log(TAG + "grantAppCertificate stub uriToAppList: " + JSON.stringify(appList)); + + resolve(data); + }) + } + + isAuthorizedApp(keyUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + data = { + isAuth: false + }; + resolve(data); + }) + } + + getAuthorizedAppList(keyUri: string) { + return new Promise((resolve, reject) => { + let data: CMResult; + let appList: Array; + + if ((!this.uriToAlias.has(keyUri)) || (!this.uriToAppList.has(keyUri))) { + data = { + appUidList: appList, + }; + resolve(data); + } + + appList = this.uriToAppList.get(keyUri); + + data = { + appUidList: appList + }; + resolve(data); + }) + } + + removeGrantedAppCertificate(keyUri: string, clientAppUid: string) { + return new Promise((resolve, reject) => { + let appList: Array; + + if ((!this.uriToAlias.has(keyUri)) || (!this.uriToAppList.has(keyUri))) { + let error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + + appList = this.uriToAppList.get(keyUri); + if (appList.indexOf(clientAppUid) != -1) { + appList = appList.filter(item => item != clientAppUid); + this.uriToAppList.set(keyUri, appList); + resolve(); + } else { + let error = { + code: CMErrorCode.CMR_ERROR_NOT_EXIST, + }; + reject(error); + } + }) + } + + init(authUri: string, spec: CMSignatureSpec) { + return new Promise((resolve, reject) => { + let errorCode = CMErrorCode.CMR_SUCCESS; + let data: CMResult; + + resolve(); + }) + } + + update(handle: number, data: Uint8Array, token?: Uint8Array) { + return new Promise((resolve, reject) => { + let errorCode = CMErrorCode.CMR_SUCCESS; + let data: CMResult; + + resolve(); + }) + } + + finish(handle: number, signature?: Uint8Array) { + return new Promise((resolve, reject) => { + let errorCode = CMErrorCode.CMR_SUCCESS; + let data: CMResult; + + resolve(); + }) + } + + abort(handle: number) { + return new Promise((resolve, reject) => { + let errorCode = CMErrorCode.CMR_SUCCESS; + let data: CMResult; + + resolve(); + }) + } + + mapToJson(map) { + let obj = Object.create(null); + for (let [k, v] of map) { + obj[k] = v; + } + + return JSON.stringify(obj) + } + + jsonToMap(jsonString) { + console.log(TAG + "jsonToMap start"); + let map = new Map(); + let obj = JSON.parse(jsonString); + + for (let k of Object.keys(obj)) { + map.set(k, obj[k]) + } + return map; + } + + saveAllMaps() { + console.log(TAG + "saveAllMaps start"); + let dataList = [ + this.mapToJson(this.systemCertMap), + this.mapToJson(this.userCertMap), + this.mapToJson(this.uriToAlias), + this.mapToJson(this.appCredMap), + this.mapToJson(this.privateCredMap), + this.mapToJson(this.uriToAppList) + ]; + + let context = globalThis.certManagerAbilityContext; + let path = context.cacheDir; + path += '/certStubData' + try { + fileio.unlinkSync(path); + } catch (err) { + console.log(TAG + "saveAllMaps unlinkSync err: " + err); + } + let fd = fileio.openSync(path, 0o102, 0o666); + fileio.writeSync(fd, JSON.stringify(dataList)); + fileio.closeSync(fd); + console.log(TAG + "saveAllMaps end"); + } + + uint8ArrayToString(fileData) { + var dataString = ""; + for (var i = 0; i < fileData.length; i++) { + dataString += String.fromCharCode(fileData[i]); + } + return dataString + } + + restoreMapsFromJson(json) { + console.log(TAG + "restoreMapsFromJson start Json: " + json); + let dataList = JSON.parse(json); + this.systemCertMap = this.jsonToMap(dataList[0]); + this.userCertMap = this.jsonToMap(dataList[1]); + this.uriToAlias = this.jsonToMap(dataList[2]); + this.appCredMap = this.jsonToMap(dataList[3]); + this.privateCredMap = this.jsonToMap(dataList[4]); + this.uriToAppList = this.jsonToMap(dataList[5]); + console.log(TAG + "restoreMapsFromJson end"); + } + + restoreAllMaps() { + console.log(TAG + "getAllMaps start"); + let context = globalThis.certManagerAbilityContext; + let path = context.cacheDir; + path += '/certStubData' + + try { + let fd = fileio.openSync(path, 0o002, 0o666); + console.log(TAG + "getAllMaps fd: " + fd); + let stat = fileio.fstatSync(fd); + let size = stat.size; + let buf = new ArrayBuffer(size); + + fileio.read(fd, buf, (err, data) => { + if (data) { + this.restoreMapsFromJson(this.uint8ArrayToString(new Uint8Array(data.buffer))); + } + fileio.closeSync(fd); + }); + } catch(err) { + console.log(TAG + "getAllMaps err: " + err); + } + + console.log(TAG + "getAllMaps end"); + } +} + +let certStub = new CertStubPromise(); + +export default certStub as CertStubPromise; \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/stub/certStubStruct.ts b/CertificateManager/product/phone/src/main/ets/stub/certStubStruct.ts new file mode 100644 index 0000000..e5e059f --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/stub/certStubStruct.ts @@ -0,0 +1,161 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface CertInfo { + uri: string, + certAlias: string, + status: boolean, + issuerName: string, + subjectName: string, + serial: string, + notBefore: string, + notAfter: string, + fingerprintSha256: string, + cert: Uint8Array +} + +export interface certAbstract { + uri: string, + certAlias: string, + status: boolean, + subjectName: string, +} + +export interface CMResult { + certList?: Array, + certInfo?: CertInfo, + credentialList?:Array, + credential?: Credential, + appUidList?: Array + authUri?: string, + outData?: Uint8Array, + isAuth?: boolean +} + +export interface CMHandle { + errorCode: number, + handle: number; + token?: Uint8Array; +} + +export interface Credential { + type: string, + alias: string, + keyUri: string, + certNum: number, + keyNum: number, + credData: Uint8Array +} + +export interface CredentialAbstract { + type: string, + alias: string, + keyUri: string +} + +export interface CMContext { + userId: string, + uid: string, + packageName: string +}; + +export interface CMBlob { + readonly inData?: Uint8Array, + readonly alias?: string +}; + +export interface CMKeyProperties { + type: string; // Type of the key, must be CM_URI_TYPE_APP_KEY or CM_URI_TYPE_WLAN_KEY + alg: string; + size: number; + padding: string; + purpose: string; + digest: string; + authType: string; + authTimeout: string; +}; + +export interface CMSignatureSpec { + alg: string; + padding: string; + digest: string; + authToken: Uint8Array; // required only for user authentication +}; + +export enum CertManagerStore { + CERT_MANAGER_CREDENTIAL_STORE = 0, /* credential certificate store for end entity certificates. */ + CERT_MANAGER_SYSTEM_TRUSTED_STORE = 1, /* read only, updated by system only. */ + CERT_MANAGER_USER_TRUSTED_STORE = 2, /* modifiable by applications and user. */ + CERT_MANAGER_APPLICATION_TRUSTED_STORE = 3, /* application specific trusted certificate store; modifiable by the application only. */ +} + +export enum CMErrorCode { + CMR_SUCCESS = 0, + CMR_FAILURE = -1, + CMR_ERROR_INSTALL_CERTIFICATE = -2, + CMR_ERROR_SET_STATUS = -3, + CMR_ERROR_INVALID_ARGUMENT = -3, + CMR_ERROR_INVALID_STORE = -4, + CMR_ERROR_NOT_SUPPORTED = -5, + CMR_ERROR_UNINSTALL = -6, + CMR_ERROR_NO_PERMISSION = -7, + CMR_ERROR_INSUFFICIENT_DATA = -8, + CMR_ERROR_GET_CERTIRICATE = -9, + CMR_ERROR_STORAGE_FAILURE = -10, + CMR_ERROR_HARDWARE_FAILURE = -11, + CMR_ERROR_ALREADY_EXISTS = -12, + CMR_ERROR_NOT_EXIST = -13, + CMR_ERROR_NULL_POINTER = -14, + CMR_ERROR_FILE_SIZE_FAIL = -15, + CMR_ERROR_READ_FILE_FAIL = -16, + CMR_ERROR_INVALID_PUBLIC_KEY = -17, + CMR_ERROR_INVALID_PRIVATE_KEY = -18, + CMR_ERROR_INVALID_KEY_INFO = -19, + CMR_ERROR_REMOVE_CERTIFICATE_FAIL = -20, + CMR_ERROR_OPEN_FILE_FAIL = -21, + CMR_ERROR_INVALID_KEY_FILE = -22, + CMR_ERROR_IPC_MSG_FAIL = -23, + CMR_ERROR_REQUEST_OVERFLOWS = -24, + CMR_ERROR_PARAM_NOT_EXIST = -25, + CMR_ERROR_CRYPTO_ENGINE_ERROR = -26, + CMR_ERROR_COMMUNICATION_TIMEOUT = -27, + CMR_ERROR_IPC_INIT_FAIL = -28, + CMR_ERROR_IPC_DLOPEN_FAIL = -29, + CMR_ERROR_EFUSE_READ_FAIL = -30, + + CMR_ERROR_CHECK_GET_ALG_FAIL = -100, + CMR_ERROR_CHECK_GET_KEY_SIZE_FAIL = -101, + CMR_ERROR_CHECK_GET_PADDING_FAIL = -102, + CMR_ERROR_INVALID_DIGEST = -117, + + CMR_ERROR_INTERNAL_ERROR = -999, + CMR_ERROR_UNKNOWN_ERROR = -1000, +} + +export interface BusinessError { + /** + * Defines the basic error code. + * @since 6 + */ + code: number; +} + +export interface AsyncCallback { + /** + * Defines the callback data. + * @since 6 + */ + (err: BusinessError, data: T): void; +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/ets/stub/certStubUtil.ts b/CertificateManager/product/phone/src/main/ets/stub/certStubUtil.ts new file mode 100644 index 0000000..a1a07d8 --- /dev/null +++ b/CertificateManager/product/phone/src/main/ets/stub/certStubUtil.ts @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CertInfo, certAbstract, CMResult, CMContext, AsyncCallback, BusinessError, CMHandle, + Credential, CredentialAbstract, CMErrorCode, CMBlob, CMKeyProperties, CMSignatureSpec } from './certStubStruct' + +export default class certStubUtil { + constructor() { + } + +parseCertInfo(uri: string, certAlias: string, status: boolean, cert: Uint8Array): CertInfo { + let certInfo: CertInfo; + + certInfo = { + uri: uri, + certAlias: certAlias, + status: status, + issuerName: "CN=SwissSign Gold CA - G2,OU=,O=SwissSign CA", + subjectName: "CN=SwissSign Gold CA - G2,OU=,O=SwissSign CA", + serial: "BB401C43F55E4FB0", + notBefore: "1979/5/24", + notAfter: "2030/5/24", + fingerprintSha256: "D8:C5:38:8A:B7:30:1B:1B:6E:D4:7A:E6:45:25:3A:6F:9F:1A:27:61", + cert: cert + } + + return certInfo; +} + +parseCertAbstract(uri: string, certAlias: string, status: boolean): certAbstract { + let result: certAbstract; + + result = { + uri: uri, + certAlias: certAlias, + status: status, + subjectName: "CN=SwissSign Gold CA - G2,OU=,O=SwissSign", + } + + return result; +} + + +parseCMHandle(errorCode: number, handle: number, token: Uint8Array): CMHandle { + let result: CMHandle; + + result = { + errorCode: errorCode, + handle: handle, + token: token, + } + + return result; +} + +parseCredential(type: string, alias: string, keyUri: string, certNum: number, + keyNum: number, credData: Uint8Array): Credential { + let result: Credential; + + result = { + type: type, + alias: alias, + keyUri: keyUri, + certNum: certNum, + keyNum: keyNum, + credData: credData + } + + return result; +} + +parseCredentialAbstract(type: string, alias: string, keyUri: string): CredentialAbstract { + let result: CredentialAbstract; + + result = { + type: type, + alias: alias, + keyUri: keyUri + } + + return result; +} + +parseCMContext(userId: string, uid: string, packageName: string): CMContext { + let result: CMContext; + + result = { + userId: userId, + uid: uid, + packageName: packageName + } + + return result; +} + +parseCMBlob(inData: Uint8Array, alias: string): CMBlob { + let result: CMBlob; + + result = { + inData: inData, + alias: alias + } + + return result; +} + +parseCMKeyProperties(): CMKeyProperties { + let result: CMKeyProperties; + + result = { + type: "CM_URI_TYPE_APP_KEY", // Type of the key, must be CM_URI_TYPE_APP_KEY or CM_URI_TYPE_WLAN_KEY + alg: "alg", + size: 375, + padding: "padding purpose", + purpose: "purpose property", + digest: "digest property", + authType: "Sha-256", + authTimeout: "30" + } + + return result; +} + +parseCMSignatureSpec(alg: string, padding: string, digest: string, authToken: Uint8Array): CMSignatureSpec { + let result: CMSignatureSpec; + + result = { + alg: alg, + padding: padding, + digest: digest, + authToken: authToken // required only for user authentication + } + + return result; +} + +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/module.json5 b/CertificateManager/product/phone/src/main/module.json5 new file mode 100644 index 0000000..ab8d71a --- /dev/null +++ b/CertificateManager/product/phone/src/main/module.json5 @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "module": { + "name": "phone", + "type": "feature", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:mainability_description", + "mainElement": "MainAbility", + "deviceTypes": [ + "phone" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "uiSyntax": "ets", + "abilities": [ + { + "name": "MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:mainability_description", + "icon": "$media:icon", + "label": "$string:entry_MainAbility", + "visible": true, + "launchType": "singleton" + } + ], + "requestPermissions": [ + { + "name": "ohos.permission.GET_BUNDLE_INFO" + }, + { + "name": "ohos.permission.READ_MEDIA", + "reason": "$string:read_media_permission_reason" + } + ] + } +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/element/color.json b/CertificateManager/product/phone/src/main/resources/base/element/color.json new file mode 100644 index 0000000..2cb0964 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/element/color.json @@ -0,0 +1,272 @@ +{ + "color": [ + { + "name": "color_333333_grey", + "value": "#333333" + }, + { + "name": "color_666666_grey", + "value": "#666666" + }, + { + "name": "color_999999_grey", + "value": "#999999" + }, + { + "name": "color_E3E3E3_grey", + "value": "#E3E3E3" + }, + { + "name": "color_D8D8D8_grey", + "value": "#D8D8D8" + }, + { + "name": "color_button_grey", + "value": "#1824310D" + }, + { + "name": "color_00000000_transparent", + "value": "#00000000" + }, + { + "name": "volume_bg_color", + "value": "#CCFFFFFF" + }, + { + "name": "white_bg_color", + "value": "#FFFFFF" + }, + { + "name": "font_color_182431", + "value": "#182431" + }, + { + "name": "font_color_007DFF", + "value": "#007DFF" + }, + { + "name": "search_no_result_text_color", + "value": "$color:font_color_182431" + }, + { + "name": "search_result_text_color", + "value": "$color:font_color_182431" + }, + { + "name": "search_result_text_color_highlight", + "value": "$color:font_color_007DFF" + }, + { + "name": "bluetooth_text_color_highlight", + "value": "$color:font_color_007DFF" + }, + { + "name": "FAFAFA", + "value": "#FAFAFA" + }, + { + "name": "DCEAF9", + "value": "#DCEAF9" + }, + { + "name": "4C89F0", + "value": "#4C89F0" + }, + { + "name": "D1D0DB", + "value": "#D1D0DB" + }, + { + "name": "cm_del_all_font_color", + "value": "#007DFF" + }, + { + "name": "cm_del_all_cancel_button_color", + "value": "#007DFF" + }, + { + "name": "cm_del_all_delete_button_color", + "value": "#FA2A2D" + }, + { + "name": "request_auth_font_color", + "value": "#182431" + }, + { + "name": "request_auth_background_color", + "value": "#FFFFFF" + }, + { + "name": "request_auth_bt_font_color", + "value": "#4C89F0" + }, + { + "name": "request_auth_color", + "value": "#E5E5E5" + }, + { + "name": "install_cancel_bt_font_color", + "value": "#007DFF" + }, + { + "name": "install_cancel_bt_bg_color", + "value": "#0d182431" + }, + { + "name": "install_confirm_bt_font_color", + "value": "#ffffffff" + }, + { + "name": "install_confirm_bt_bg_color", + "value": "#007DFF" + }, + { + "name": "install_confirm_bt_bg_disable_color", + "value": "#66007DFF" + }, + { + "name": "install_info_font_color", + "value": "#E6000000" + }, + { + "name": "credentials_app_name_color", + "value": "#182431" + }, + { + "name": "credentials_app_Toggle_selectColor", + "value": "#007DFF" + }, + { + "name": "credentials_app_title_color", + "value": "#182431" + }, + { + "name": "credentials_app_list_backgroundColor", + "value": "#FFFFFF" + }, + { + "name": "credentials_app_finishColor", + "value": "#4C89F0" + }, + { + "name": "credentials_app_finish_backgroundColor", + "value": "#FFFFFF" + }, + { + "name": "credentials_detail_keyNum_fontColor", + "value": "#000000" + }, + { + "name": "credentials_detail_close_fontColor", + "value": "#4C89F0" + }, + { + "name": "warning_delete_fontColor", + "value": "#FF0000" + }, + { + "name": "public_delete_fontColor", + "value": "#CD5C5C" + }, + { + "name": "evidenceList_TabBuilder_fontColor_182431", + "value": "#182431" + }, + { + "name": "Evidence_color", + "value": "#0D000000" + }, + { + "name": "Evidence_backgroundColor", + "value": "#F1F3F5" + }, + { + "name": "sys_list_divider_color_000000", + "value": "#0D000000" + }, + { + "name": "TrustedEvidence_TabBuilder_fontColor_182431", + "value": "#182431" + }, + { + "name": "sys_list_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "user_list_divider_color_000000", + "value": "#0D000000" + }, + { + "name": "user_list_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "componentUser_text_fontColor_182431", + "value": "#182431" + }, + { + "name": "ComponentSystem_text_fontColor_182431", + "value": "#182431" + }, + { + "name": "ComponentSystem_Toggle_selectedColor_007DFF", + "value": "#007DFF" + }, + { + "name": "CustomDialogExample_text_fontColor_182431", + "value": "#182431" + }, + { + "name": "CustomDialogExample_list_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "CustomDialogExample_Button_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "CustomDialogExample_Button_fontColor_4C89F0", + "value": "#4C89F0" + }, + { + "name": "CustomDialogExampleUser_text_fontColor_182431", + "value": "#182431" + }, + { + "name": "CustomDialogExampleUser_Flex_Toggle_selectedColor_007DFF", + "value": "#007DFF" + }, + { + "name": "CustomDialogExampleUser_Flex_firButton_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "CustomDialogExampleUser_Flex_firButton_fontColor_4C89F0", + "value": "#4C89F0" + }, + { + "name": "CustomDialogExampleUser_warning_secButton_fontColor_FF0000", + "value": "#FF0000" + }, + { + "name": "CustomDialogExampleUser_Flex_secButton_backgroundColor_FFFFFF", + "value": "#FFFFFF" + }, + { + "name": "CustomDialogExampleUser_Flex_secButton_fontColor_FF0000", + "value": "#FF0000" + }, + { + "name": "DialogSubjectComponent_Text_fontColor_182431", + "value": "#182431" + }, + { + "name": "CertManager_Divider_Color_182431", + "value": "#182431" + }, + { + "name": "TrustedEvidence_tabs_backgroundColor_F1F3F5", + "value": "#F1F3F5" + } + ] +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/element/float.json b/CertificateManager/product/phone/src/main/resources/base/element/float.json new file mode 100644 index 0000000..70bc6a4 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/element/float.json @@ -0,0 +1,1680 @@ +{ + "float": [ + { + "name": "wh_value_0", + "value": "0vp" + }, + { + "name": "wh_value_1", + "value": "1vp" + }, + { + "name": "wh_value_1_5", + "value": "1.5vp" + }, + { + "name": "wh_value_2", + "value": "2vp" + }, + { + "name": "wh_value_3", + "value": "3vp" + }, + { + "name": "wh_value_4", + "value": "4vp" + }, + { + "name": "wh_value_5", + "value": "5vp" + }, + { + "name": "wh_value_6", + "value": "6vp" + }, + { + "name": "wh_value_8", + "value": "8vp" + }, + { + "name": "wh_value_9", + "value": "9vp" + }, + { + "name": "wh_value_10", + "value": "10vp" + }, + { + "name": "wh_value_11", + "value": "11vp" + }, + { + "name": "wh_value_12", + "value": "12vp" + }, + { + "name": "wh_value_13", + "value": "13vp" + }, + { + "name": "wh_value_15", + "value": "15vp" + }, + { + "name": "wh_value_16", + "value": "16vp" + }, + { + "name": "wh_value_18", + "value": "18vp" + }, + { + "name": "wh_value_19", + "value": "19vp" + }, + { + "name": "wh_value_20", + "value": "20vp" + }, + { + "name": "wh_value_21", + "value": "21vp" + }, + { + "name": "wh_value_22", + "value": "22vp" + }, + { + "name": "wh_value_24", + "value": "24vp" + }, + { + "name": "wh_value_26", + "value": "26vp" + }, + { + "name": "wh_value_28", + "value": "28vp" + }, + { + "name": "wh_value_30", + "value": "30vp" + }, + { + "name": "wh_value_32", + "value": "32vp" + }, + { + "name": "wh_value_33", + "value": "33vp" + }, + { + "name": "wh_value_40", + "value": "40vp" + }, + { + "name": "wh_value_44", + "value": "44vp" + }, + { + "name": "wh_value_48", + "value": "48vp" + }, + { + "name": "wh_value_50", + "value": "50vp" + }, + { + "name": "wh_value_52", + "value": "52vp" + }, + { + "name": "wh_value_56", + "value": "56vp" + }, + { + "name": "wh_value_60", + "value": "60vp" + }, + { + "name": "wh_value_64", + "value": "64vp" + }, + { + "name": "wh_value_65", + "value": "65vp" + }, + { + "name": "wh_value_67", + "value": "67vp" + }, + { + "name": "wh_value_70", + "value": "70vp" + }, + { + "name": "wh_value_80", + "value": "80vp" + }, + { + "name": "wh_value_96", + "value": "96vp" + }, + { + "name": "wh_value_100", + "value": "100vp" + }, + { + "name": "wh_value_109", + "value": "109vp" + }, + { + "name": "wh_value_118", + "value": "118vp" + }, + { + "name": "wh_value_119", + "value": "119vp" + }, + { + "name": "wh_value_120", + "value": "120vp" + }, + { + "name": "wh_value_130", + "value": "1300vp" + }, + { + "name": "wh_value_152", + "value": "152vp" + }, + { + "name": "wh_value_160", + "value": "160vp" + }, + { + "name": "wh_value_200", + "value": "200vp" + }, + { + "name": "wh_value_208", + "value": "208vp" + }, + { + "name": "wh_value_210", + "value": "210vp" + }, + { + "name": "wh_value_212", + "value": "212vp" + }, + { + "name": "wh_value_216", + "value": "216vp" + }, + { + "name": "wh_value_230", + "value": "230vp" + }, + { + "name": "wh_value_248", + "value": "248vp" + }, + { + "name": "wh_value_250", + "value": "250vp" + }, + { + "name": "wh_value_263", + "value": "263vp" + }, + { + "name": "wh_value_280", + "value": "280vp" + }, + { + "name": "wh_value_298", + "value": "298vp" + }, + { + "name": "wh_value_336", + "value": "336vp" + }, + { + "name": "wh_value_362", + "value": "362vp" + }, + { + "name": "wh_value_390", + "value": "390vp" + }, + { + "name": "wh_value_400", + "value": "400vp" + }, + { + "name": "wh_value_410", + "value": "410vp" + }, + { + "name": "wh_value_620", + "value": "620vp" + }, + { + "name": "wh_value_720", + "value": "720vp" + }, + { + "name": "font_35", + "value": "35fp" + }, + { + "name": "font_10", + "value": "10fp" + }, + { + "name": "font_12", + "value": "12fp" + }, + { + "name": "font_14", + "value": "14fp" + }, + { + "name": "font_16", + "value": "16fp" + }, + { + "name": "font_17", + "value": "17fp" + }, + { + "name": "font_18", + "value": "18fp" + }, + { + "name": "font_20", + "value": "20fp" + }, + { + "name": "font_21", + "value": "21fp" + }, + { + "name": "font_22", + "value": "22fp" + }, + { + "name": "font_24", + "value": "24fp" + }, + { + "name": "font_28", + "value": "28fp" + }, + { + "name": "font_30", + "value": "30fp" + }, + { + "name": "font_50", + "value": "50fp" + }, + { + "name": "lineHeight_19", + "value": "19vp" + }, + { + "name": "lineHeight_21", + "value": "21vp" + }, + { + "name": "lineHeight_22", + "value": "22vp" + }, + { + "name": "lineHeight_33", + "value": "33vp" + }, + { + "name": "lineHeight_41", + "value": "41vp" + }, + { + "name": "distance_1", + "value": "1vp" + }, + { + "name": "distance_2", + "value": "2vp" + }, + { + "name": "distance_4", + "value": "4vp" + }, + { + "name": "distance_6", + "value": "6vp" + }, + { + "name": "distance_8", + "value": "8vp" + }, + { + "name": "distance_9", + "value": "9vp" + }, + { + "name": "distance_9_5", + "value": "9.5vp" + }, + { + "name": "distance_10", + "value": "10vp" + }, + { + "name": "distance_11", + "value": "11vp" + }, + { + "name": "distance_11_5", + "value": "11.5vp" + }, + { + "name": "distance_12", + "value": "12vp" + }, + { + "name": "distance_13", + "value": "13vp" + }, + { + "name": "distance_14", + "value": "14vp" + }, + { + "name": "distance_15", + "value": "15vp" + }, + { + "name": "distance_16", + "value": "16vp" + }, + { + "name": "distance_17", + "value": "17vp" + }, + { + "name": "distance_18", + "value": "18vp" + }, + { + "name": "distance_19", + "value": "19vp" + }, + { + "name": "distance_19_5", + "value": "19.5vp" + }, + { + "name": "distance_20", + "value": "20vp" + }, + { + "name": "distance_21", + "value": "21vp" + }, + { + "name": "distance_22_5", + "value": "22.5vp" + }, + { + "name": "distance_24", + "value": "24vp" + }, + { + "name": "distance_26", + "value": "26vp" + }, + { + "name": "distance_27_5", + "value": "27.5vp" + }, + { + "name": "distance_30", + "value": "30vp" + }, + { + "name": "distance_32", + "value": "32vp" + }, + { + "name": "distance_36", + "value": "36vp" + }, + { + "name": "distance_48", + "value": "48vp" + }, + { + "name": "distance_64", + "value": "64vp" + }, + { + "name": "distance_66", + "value": "66vp" + }, + { + "name": "distance_80", + "value": "80vp" + }, + { + "name": "distance_96", + "value": "96vp" + }, + { + "name": "sys_corner_radius_clicked", + "value": "8vp" + }, + { + "name": "sys_elements_margin_vertical_l", + "value": "16vp" + }, + { + "name": "sys_elements_margin_vertical_m", + "value": "8vp" + }, + { + "name": "sys_elements_margin_horizontal_l", + "value": "16vp" + }, + { + "name": "sys_elements_margin_horizontal_m", + "value": "16vp" + }, + { + "name": "page_margin_horizontal", + "value": "24vp" + }, + { + "name": "square_click_image_size", + "value": "48vp" + }, + { + "name": "control_common_font_size", + "value": "20fp" + }, + { + "name": "item_common_vertical_margin", + "value": "20vp" + }, + { + "name": "item_common_horizontal_margin", + "value": "24vp" + }, + { + "name": "item_icon_size", + "value": "24vp" + }, + { + "name": "item_arrow_width", + "value": "12vp" + }, + { + "name": "slider_text_padding_left", + "value": "5vp" + }, + { + "name": "page_header_height", + "value": "56vp" + }, + { + "name": "volume_border_radius", + "value": "15vp" + }, + { + "name": "radius_12", + "value": "12vp" + }, + { + "name": "radius_20", + "value": "20vp" + }, + { + "name": "radius_24", + "value": "24vp" + }, + { + "name": "radius_32", + "value": "32vp" + }, + { + "name": "radius_40", + "value": "40vp" + }, + { + "name": "search_placeholder_font", + "value": "22fp" + }, + { + "name": "search_input_height", + "value": "40vp" + }, + { + "name": "search_input_margin_start", + "value": "64vp" + }, + { + "name": "search_input_horizontal_margin", + "value": "8vp" + }, + { + "name": "search_input_border_radius", + "value": "20vp" + }, + { + "name": "search_no_result_image_size", + "value": "160vp" + }, + { + "name": "search_no_result_text_font_size", + "value": "14fp" + }, + { + "name": "search_no_result_margin_top", + "value": "174vp" + }, + { + "name": "search_item_height", + "value": "72vp" + }, + { + "name": "search_result_item_title_font_size", + "value": "16vp" + }, + { + "name": "search_result_item_summary_font_size", + "value": "14fp" + }, + { + "name": "slider_image_width", + "value": "40vp" + }, + { + "name": "slider_image_height", + "value": "40vp" + }, + { + "name": "slider_image_margin", + "value": "15vp" + }, + { + "name": "audio_subtitle_font", + "value": "18fp" + }, + { + "name": "audio_subtitle_margin_left", + "value": "10vp" + }, + { + "name": "audio_subtitle_margin_bottom", + "value": "5vp" + }, + { + "name": "audio_title_summary_margin_left", + "value": "15vp" + }, + { + "name": "audio_summary_subtitle_margin_bottom", + "value": "10vp" + }, + { + "name": "audio_subtitle_margin_top", + "value": "10vp" + }, + { + "name": "audio_sound_mode_outer_height", + "value": "280vp" + }, + { + "name": "audio_sound_mode_inner_padding_top", + "value": "15vp" + }, + { + "name": "audio_sound_mode_inner_padding_bottom", + "value": "15vp" + }, + { + "name": "audio_sound_mode_outer_padding", + "value": "16vp" + }, + { + "name": "audio_sound_mode_item_inner_padding_top", + "value": "5vp" + }, + { + "name": "audio_sound_mode_border_width", + "value": "1vp" + }, + { + "name": "audio_sound_mode_border_radius", + "value": "15vp" + }, + { + "name": "audio_sound_mode_image_size", + "value": "40vp" + }, + { + "name": "audio_sound_mode_text_margin_top", + "value": "16vp" + }, + { + "name": "audio_sound_mode_font_size", + "value": "20fp" + }, + { + "name": "audio_sound_mode_radio_size", + "value": "36vp" + }, + { + "name": "audio_image_common_size", + "value": "50vp" + }, + { + "name": "audio_image_margin_right", + "value": "10vp" + }, + { + "name": "audio_subtitle_font_size", + "value": "18fp" + }, + { + "name": "audio_margin_left", + "value": "15vp" + }, + { + "name": "audio_start_end_margin_left", + "value": "15vp" + }, + { + "name": "audio_icon_height", + "value": "60vp" + }, + { + "name": "audio_no_icon_height", + "value": "70vp" + }, + { + "name": "audio_slider_height", + "value": "250vp" + }, + { + "name": "audio_volume_height", + "value": "280vp" + }, + { + "name": "audio_border_width", + "value": "1vp" + }, + { + "name": "audio_border_radius", + "value": "15vp" + }, + { + "name": "audio_volume_component_padding", + "value": "16vp" + }, + { + "name": "restore_factory_font_size", + "value": "20fp" + }, + { + "name": "restore_factory_button_width", + "value": "186vp" + }, + { + "name": "restore_factory_button_height", + "value": "40vp" + }, + { + "name": "switch_title_subtitle_size", + "value": "20fp" + }, + { + "name": "switch_component_margin", + "value": "12vp" + }, + { + "name": "switch_toggle_width", + "value": "36vp" + }, + { + "name": "switch_toggle_height", + "value": "20vp" + }, + { + "name": "switch_component_height", + "value": "70vp" + }, + { + "name": "application_common_size", + "value": "45vp" + }, + { + "name": "application_button_subtitle_size", + "value": "16fp" + }, + { + "name": "application_button_height", + "value": "40vp" + }, + { + "name": "storage_common_margin", + "value": "15vp" + }, + { + "name": "location_font_size", + "value": "16fp" + }, + { + "name": "location_common_margin", + "value": "15vp" + }, + { + "name": "storage_data_panel_height", + "value": "230vp" + }, + { + "name": "password_list_item_height", + "value": "48vp" + }, + { + "name": "password_list_item_title_font_size", + "value": "16vp" + }, + { + "name": "password_input_message_vertical_margin", + "value": "20vp" + }, + { + "name": "password_count_down_view_vertical_margin", + "value": "20vp" + }, + { + "name": "password_input_button_space", + "value": "10vp" + }, + { + "name": "password_input_button_margin_top", + "value": "40vp" + }, + { + "name": "radio_component_height", + "value": "30vp" + }, + { + "name": "radio_component_margin_bottom_right", + "value": "15vp" + }, + { + "name": "dataPanel_distance", + "value": "320vp" + }, + { + "name": "dataPanel_proportion_font_size", + "value": "66.67fp" + }, + { + "name": "dataPanel_percent_font_size", + "value": "17.78fp" + }, + { + "name": "dataPanel_used_font_size", + "value": "17.78fp" + }, + { + "name": "location_toggle_width", + "value": "36vp" + }, + { + "name": "location_toggle_height", + "value": "20vp" + }, + { + "name": "location_toggle_margin", + "value": "12vp" + }, + { + "name": "wh_value_72", + "value": "72vp" + }, + { + "name": "switch_summary_margin", + "value": "2vp" + }, + { + "name": "single_item_height", + "value": "48vp" + }, + { + "name": "wh_value_240", + "value": "240vp" + }, + { + "name": "wh_value_245", + "value": "245vp" + }, + { + "name": "wh_value_260", + "value": "260vp" + }, + { + "name": "wh_value_288", + "value": "288vp" + }, + { + "name": "wh_value_324", + "value": "324vp" + }, + { + "name": "opacity_0_2", + "value": "0.2" + }, + { + "name": "paired_device_button_width", + "value": "186vp" + }, + { + "name": "component_button_width", + "value": "263vp" + }, + { + "name": "component_button_width_phone", + "value": "148vp" + }, + { + "name": "pinCode_font_size", + "value": "32fp" + }, + { + "name": "deviceName_button_width", + "value": "263vp" + }, + { + "name": "applicationInfo_button_width", + "value": "324vp" + }, + { + "name": "passwordSetting_button_width", + "value": "261vp" + }, + { + "name": "dialog_16", + "value": "0vp" + }, + { + "name": "dialog_118", + "value": "118vp" + }, + { + "name": "wh_4", + "value": "4vp" + }, + { + "name": "wh_10", + "value": "10vp" + }, + { + "name": "wh_20", + "value": "20vp" + }, + { + "name": "wh_23", + "value": "23vp" + }, + { + "name": "wh_24", + "value": "24vp" + }, + { + "name": "wh_35", + "value": "16vp" + }, + { + "name": "wh_37", + "value": "0vp" + }, + { + "name": "wh_42", + "value": "42vp" + }, + { + "name": "wh_48", + "value": "52vp" + }, + { + "name": "wh_192", + "value": "192vp" + }, + { + "name": "wh_205", + "value": "205vp" + }, + { + "name": "wh_263", + "value": "263vp" + }, + { + "name": "wh_600", + "value": "600vp" + }, + { + "name": "wh_hed_14", + "value": "0vp" + }, + { + "name": "padding_24", + "value": "24vp" + }, + { + "name": "padding_26", + "value": "26vp" + }, + { + "name": "wh_padding_32", + "value": "32vp" + }, + { + "name": "wh_padding_33", + "value": "33vp" + }, + { + "name": "wh_padding_35", + "value": "35vp" + }, + { + "name": "wh_padding_48", + "value": "48vp" + }, + { + "name": "wh_padding_112", + "value": "112vp" + }, + { + "name": "wh_padding_128", + "value": "128vp" + }, + { + "name": "wh_padding_212", + "value": "212vp" + }, + { + "name": "dataPanel_proportion_font_size_1", + "value": "60fp" + }, + { + "name": "dataPanel_percent_font_size_1", + "value": "16vp" + }, + { + "name": "dataPanel_used_font_size_1", + "value": "14vp" + }, + { + "name": "divider_wh", + "value": "0.5vp" + }, + { + "name": "progress_bottom", + "value": "24vp" + }, + { + "name": "head_font_20", + "value": "20vp" + }, + { + "name": "opacity_100_60", + "value": "0.6" + }, + { + "name": "request_auth_radio_width", + "value": "36vp" + }, + { + "name": "request_auth_radio_height", + "value": "20vp" + }, + { + "name": "request_auth_dialog_height", + "value": "500vp" + }, + { + "name": "request_auth_divider_endMargin", + "value": "15vp" + }, + { + "name": "request_auth_borderRadius", + "value": "24vp" + }, + { + "name": "request_auth_strokeWidth", + "value": "1" + }, + { + "name": "credentials_app_image_wh", + "value": "40vp" + }, + { + "name": "credentials_app_image_hg", + "value": "40vp" + }, + { + "name": "credentials_app_image_margin", + "value": "50vp" + }, + { + "name": "credentials_app_name_margin", + "value": "16vp" + }, + { + "name": "credentials_app_Toggle_margin", + "value": "35vp" + }, + { + "name": "credentials_app_Toggle_wh", + "value": "36vp" + }, + { + "name": "credentials_app_Toggle_hg", + "value": "20vp" + }, + { + "name": "credentials_app_title_margin_bottom", + "value": "10vp" + }, + { + "name": "credentials_app_title_margin_left", + "value": "16vp" + }, + { + "name": "credentials_app_title_margin_top", + "value": "24vp" + }, + { + "name": "credentials_app_ListItem_margin_top", + "value": "30vp" + }, + { + "name": "credentials_app_List_margin_bottom", + "value": "20vp" + }, + { + "name": "credentials_app_Flex_margin_bottom", + "value": "20vp" + }, + { + "name": "credentials_app_dialog_margin_top", + "value": "31vp" + }, + { + "name": "credentials_app_list_hg", + "value": "360vp" + }, + { + "name": "credentials_app_list_margin_top", + "value": "20vp" + }, + { + "name": "credentials_app_list_padding_top", + "value": "4vp" + }, + { + "name": "credentials_app_list_padding_bottom", + "value": "14vp" + }, + { + "name": "credentials_app_list_borderRadius", + "value": "24vp" + }, + { + "name": "credentials_app_finish_margin_top", + "value": "10vp" + }, + { + "name": "credentials_app_finish_margin_bottom", + "value": "20vp" + }, + { + "name": "private_detail_title_margin_left", + "value": "16vp" + }, + { + "name": "private_detail_title_margin_top", + "value": "24vp" + }, + { + "name": "private_detail_title_margin_bottom", + "value": "20vp" + }, + { + "name": "private_detail_Text_margin_bottom", + "value": "10vp" + }, + { + "name": "private_detail_opacity", + "value": "0.7" + }, + { + "name": "private_detail_keyNum_margin_left", + "value": "30vp" + }, + { + "name": "private_detail_close_margin", + "value": "24vp" + }, + { + "name": "private_detail_margin", + "value": "10vp" + }, + { + "name": "managerAuthApp_hg", + "value": "33vp" + }, + { + "name": "managerAuthApp_image_wh", + "value": "12vp" + }, + { + "name": "managerAuthApp_image_hg", + "value": "24vp" + }, + { + "name": "managerAuthApp_image_margin", + "value": "24vp" + }, + { + "name": "managerAuthApp_image_opacity", + "value": "0.2" + }, + { + "name": "managerAuthApp_margin", + "value": "6vp" + }, + { + "name": "publicDetailsCancel_marginTop", + "value": "20vp" + }, + { + "name": "publicDetailsCancel_marginBottom", + "value": "24vp" + }, + { + "name": "publicList_hg", + "value": "33vp" + }, + { + "name": "publicList_margin", + "value": "12vp" + }, + { + "name": "publicList_image_wh", + "value": "12vp" + }, + { + "name": "publicList_image_hg", + "value": "24vp" + }, + { + "name": "publicList_image_margin", + "value": "12vp" + }, + { + "name": "publicList_image_opacity", + "value": "0.2" + }, + { + "name": "publicList_height", + "value": "64vp" + }, + { + "name": "publicList_borderRadius", + "value": "24vp" + }, + { + "name": "publicList_item_hg", + "value": "96vp" + }, + { + "name": "Evidence_wh", + "value": "672vp" + }, + { + "name": "Evidence_margin", + "value": "24vp" + }, + { + "name": "Evidence_strokeWidth", + "value": "1" + }, + { + "name": "Evidence_startMargin", + "value": "15vp" + }, + { + "name": "Evidence_endMargin", + "value": "15vp" + }, + { + "name": "Evidence_borderRadius", + "value": "24vp" + }, + { + "name": "Evidence_barWidth", + "value": "672vp" + }, + { + "name": "Evidence_barHeight", + "value": "56vp" + }, + { + "name": "evidenceList_TabBuilder_Text_fontSize_value", + "value": "20vp" + }, + { + "name": "evidenceList_TabBuilder_Text_padding_left_value", + "value": "57vp" + }, + { + "name": "evidenceList_TabBuilder_Text_padding_top_value", + "value": "22vp" + }, + { + "name": "evidenceList_TabBuilder_Text_padding_opacity_value", + "value": "0.6" + }, + { + "name": "evidenceList_TabBuilder_Divider_width_value", + "value": "25vp" + }, + { + "name": "evidenceList_TabBuilder_Divider_padding_left_value", + "value": "57vp" + }, + { + "name": "evidenceList_TabBuilder_Divider_padding_top_value", + "value": "5vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Text_fontSize_value", + "value": "16vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Text_padding_left_value", + "value": "57vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Text_padding_top_value", + "value": "18vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Text_padding_opacity_value", + "value": "0.6" + }, + { + "name": "TrustedEvidence_TabBuilder_Divider_width_value", + "value": "48vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Divider_padding_left_value", + "value": "57vp" + }, + { + "name": "TrustedEvidence_TabBuilder_Divider_padding_top_value", + "value": "7vp" + }, + { + "name": "sys_list_divider_strokeWidth_value", + "value": "1" + }, + { + "name": "sys_list_divider_startMargin_value", + "value": "24vp" + }, + { + "name": "sys_list_divider_endMargin_value", + "value": "24vp" + }, + { + "name": "sys_list_divider_borderRadius_value", + "value": "24vp" + }, + { + "name": "user_list_divider_strokeWidth_value", + "value": "1" + }, + { + "name": "user_list_divider_startMargin_value", + "value": "24vp" + }, + { + "name": "user_list_divider_endMargin_value", + "value": "24vp" + }, + { + "name": "user_list_divider_borderRadius_value", + "value": "24vp" + }, + { + "name": "tabs_barWidth_value", + "value": "192vp" + }, + { + "name": "tabs_barHeight_value", + "value": "56vp" + }, + { + "name": "componentUser_firText_height_value", + "value": "22vp" + }, + { + "name": "componentUser_firText_fontSize_value", + "value": "22vp" + }, + { + "name": "componentUser_firText_margin_left_value", + "value": "24vp" + }, + { + "name": "componentUser_secText_height_value", + "value": "19vp" + }, + { + "name": "componentUser_secText_fontSize_value", + "value": "18vp" + }, + { + "name": "componentUser_secText_margin_left_value", + "value": "24vp" + }, + { + "name": "componentUser_secText_opacity_value", + "value": "0.6" + }, + { + "name": "componentUser_thdText_fontSize_value", + "value": "18vp" + }, + { + "name": "componentUser_thdText_margin_value", + "value": "4vp" + }, + { + "name": "componentUser_thdText_opacity_value", + "value": "0.6" + }, + { + "name": "componentUser_image_width_value", + "value": "12vp" + }, + { + "name": "componentUser_image_height_value", + "value": "24vp" + }, + { + "name": "componentUser_image_margin_right_value", + "value": "24vp" + }, + { + "name": "componentUser_image_opacity_value", + "value": "0.2" + }, + { + "name": "componentUser_flex_height_value", + "value": "64vp" + }, + { + "name": "componentUser_flex_borderRadius_value", + "value": "24vp" + }, + { + "name": "ComponentSystem_firText_height_value", + "value": "22vp" + }, + { + "name": "ComponentSystem_firText_fontSize_value", + "value": "22vp" + }, + { + "name": "ComponentSystem_firText_margin_left_value", + "value": "24vp" + }, + { + "name": "ComponentSystem_secText_height_value", + "value": "19vp" + }, + { + "name": "ComponentSystem_secText_fontSize_value", + "value": "18vp" + }, + { + "name": "ComponentSystem_secText_margin_left_value", + "value": "24vp" + }, + { + "name": "ComponentSystem_secText_opacity_value", + "value": "0.6" + }, + { + "name": "ComponentSystem_Toggle_margin_right_value", + "value": "24vp" + }, + { + "name": "ComponentSystem_Toggle_width_value", + "value": "36vp" + }, + { + "name": "ComponentSystem_Toggle_height_value", + "value": "20vp" + }, + { + "name": "ComponentSystem_Flex_height_value", + "value": "64vp" + }, + { + "name": "ComponentSystem_Flex_borderRadius_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_firText_fontSize_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_firText_margin_top_value", + "value": "18vp" + }, + { + "name": "CustomDialogExample_firText_margin_left_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_secText_fontSize_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_secText_margin_top_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_secText_margin_left_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_firListItem_Text_fontSize_value", + "value": "17vp" + }, + { + "name": "CustomDialogExample_firListItem_Text_margin_left_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_firListItem_Text_margin_bottom_value", + "value": "6vp" + }, + { + "name": "CustomDialogExample_secListItem_Text_fontSize_value", + "value": "17vp" + }, + { + "name": "CustomDialogExample_secListItem_Text_margin_left_value", + "value": "20vp" + }, + { + "name": "CustomDialogExample_secListItem_Text_margin_top_value", + "value": "13vp" + }, + { + "name": "CustomDialogExample_secListItem_Text_margin_bottom_value", + "value": "8vp" + }, + { + "name": "CustomDialogExample_thdListItem_Text_fontSize_value", + "value": "17vp" + }, + { + "name": "CustomDialogExample_thdListItem_Text_margin_left_value", + "value": "20vp" + }, + { + "name": "CustomDialogExample_thdListItem_Text_margin_top_value", + "value": "13vp" + }, + { + "name": "CustomDialogExample_thdListItem_Text_margin_bottom_value", + "value": "8vp" + }, + { + "name": "CustomDialogExample_list_height_value", + "value": "342vp" + }, + { + "name": "CustomDialogExample_list_margin_top_value", + "value": "21vp" + }, + { + "name": "CustomDialogExample_list_padding_top_value", + "value": "4vp" + }, + { + "name": "CustomDialogExample_list_padding_bottom_value", + "value": "4vp" + }, + { + "name": "CustomDialogExample_list_borderRadius_value", + "value": "24vp" + }, + { + "name": "CustomDialogExample_Column_margin_top_value", + "value": "6vp" + }, + { + "name": "CustomDialogExample_Button_margin_top_value", + "value": "2vp" + }, + { + "name": "CustomDialogExample_Column_height_value", + "value": "576vp" + }, + { + "name": "CustomDialogExampleUser_Flex_firText_fontSize_value", + "value": "22vp" + }, + { + "name": "CustomDialogExampleUser_Flex_firText_margin_left_value", + "value": "16vp" + }, + { + "name": "CustomDialogExampleUser_Flex_secText_fontSize_value", + "value": "18vp" + }, + { + "name": "CustomDialogExampleUser_Flex_secText_margin_left_value", + "value": "16vp" + }, + { + "name": "CustomDialogExampleUser_Flex_secText_opacity_value", + "value": "0.6" + }, + { + "name": "CustomDialogExampleUser_Flex_Toggle_margin_right_value", + "value": "37vp" + }, + { + "name": "CustomDialogExampleUser_Flex_Toggle_width_value", + "value": "36vp" + }, + { + "name": "CustomDialogExampleUser_Flex_Toggle_height_value", + "value": "20vp" + }, + { + "name": "CustomDialogExampleUser_Flex_height_value", + "value": "64vp" + }, + { + "name": "CustomDialogExampleUser_Flex_margin_top_value", + "value": "24vp" + }, + { + "name": "CustomDialogExampleUser_list_height_value", + "value": "374vp" + }, + { + "name": "CustomDialogExampleUser_list_padding_bottom_value", + "value": "14vp" + }, + { + "name": "CustomDialogExampleUser_Column_margin_top_value", + "value": "6vp" + }, + { + "name": "CustomDialogExampleUser_Flex_Button_margin_top_value", + "value": "10vp" + }, + { + "name": "CustomDialogExampleUser_Column_felx_height_value", + "value": "80vp" + }, + { + "name": "CustomDialogExampleUser_Column_height_value", + "value": "614vp" + }, + { + "name": "DialogSubjectComponent_Text_fontSize_value", + "value": "17vp" + }, + { + "name": "DialogSubjectComponent_Text_margin_left_value", + "value": "20vp" + }, + { + "name": "DialogSubjectComponent_Text_margin_top_value", + "value": "10vp" + }, + { + "name": "authorDialog_size", + "value": "500vp" + }, + { + "name": "appDialog_size", + "value": "340vp" + }, + { + "name": "privateDialog_size", + "value": "260vp" + }, + { + "name": "deleteAllDialog_size", + "value": "160vp" + } + ] +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/element/string.json b/CertificateManager/product/phone/src/main/resources/base/element/string.json new file mode 100644 index 0000000..46c879d --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/element/string.json @@ -0,0 +1,290 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "证书管理FA" + }, + { + "name": "mainability_description", + "value": "ETS_Empty Feature Ability" + }, + { + "name": "read_media_permission_reason", + "value": "安装证书功能需使用媒体库权限" + }, + { + "name": "version", + "value": "版本 " + }, + { + "name": "certificateTab", + "value": "证书与凭据" + }, + { + "name": "certificateManage", + "value": "证书管理" + }, + { + "name": "trustedEvidence", + "value": "受信任的证书" + }, + { + "name": "userEvidence", + "value": "凭据列表" + }, + { + "name": "installInStorageDevice", + "value": "从存储设备安装" + }, + { + "name": "installCertificateFailed", + "value": "从存储设备安装失败" + }, + { + "name": "certificatePwdTab", + "value": "提取证书" + }, + { + "name": "certificateAliasTab", + "value": "设置证书" + }, + { + "name": "certificatePwdInfo", + "value": "输入证书密码以提取" + }, + { + "name": "certificateAliasInfo", + "value": "输入证书名称" + }, + { + "name": "deleteAllCred", + "value": "删除所有证书与凭据" + }, + + + { + "name": "deleteAllCredDialogTitle", + "value": "删除所有证书与凭据" + }, + { + "name": "deleteAllCredDialogMessage", + "value": "所有用户证书与凭据将被永久删除。是否删除?" + }, + { + "name": "deleteAllCredCancel", + "value": "取消" + }, + { + "name": "deleteAllCredDelete", + "value": "删除" + }, + { + "name": "pickCredToAuth", + "value": "选择证书授权" + }, + { + "name": "requestAuthMsg", + "value": "应用\"%s\"请求使用证书。选择一个证书可让该应用对服务器使用此身份凭证。该应用已将请求服务标识为\"localhost\",您只应向信任的应用授予使用证书的权限。" + }, + { + "name": "requestAuthCancel", + "value": "拒绝" + }, + { + "name": "requestAuthFinish", + "value": "授权" + }, + { + "name": "requestFailPromptMsg", + "value": "授权失败,无效AppUid" + }, + { + "name": "installPwdInputCancel", + "value": "取消" + }, + { + "name": "installPwdInputConfirm", + "value": "提取" + }, + { + "name": "installAliasInputCancel", + "value": "取消" + }, + { + "name": "installAliasInputConfirm", + "value": "确定" + }, + { + "name": "installAliasInputInfo", + "value": "注:此证书颁发者可能会检查进出设备的所有流量\n该数据包包含:CA证书" + }, + { + "name": "managerAuthApp", + "value": "管理授权应用" + }, + { + "name": "cancelAuthApp", + "value": "取消" + }, + { + "name": "finishAuthApp", + "value": "完成" + }, + { + "name": "evidenceDetails", + "value": "凭据详情" + }, + { + "name": "entryContains", + "value": "此条目包含:" + }, + { + "name": "keyNum", + "value": " %s个用户密钥" + }, + { + "name": "userCerNum", + "value": " %s个用户证书" + }, + { + "name": "privateDetailsClose", + "value": "关闭" + }, + { + "name": "publicDetailsCancel", + "value": "取消" + }, + { + "name": "publicDetailsDelete", + "value": "删除" + }, + { + "name": "warning_title", + "value": "删除凭据" + }, + { + "name": "warning_message", + "value": "删除后,被授权此凭据的应用将无法正常使用。是否删除?" + }, + { + "name": "warning_cancel", + "value": "取消" + }, + { + "name": "warning_delete", + "value": "删除" + }, + { + "name": "tabName_public", + "value": "公共" + }, + { + "name": "tabName_private", + "value": "私有" + }, + { + "name": "system", + "value": "系统" + }, + { + "name": "user", + "value": "用户" + }, + { + "name": "CustomDialogExample_firText", + "value": "证书详情" + }, + { + "name": "CustomDialogExample_firListItem_text", + "value": "颁发给:" + }, + { + "name": "CustomDialogExample_secListItem_text", + "value": "颁发者:" + }, + { + "name": "CustomDialogExample_thdListItem_text", + "value": "有效期:" + }, + { + "name": "CustomDialogExample_Button_text", + "value": "取消" + }, + { + "name": "CustomDialogExample_Button_on", + "value": "启用" + }, + { + "name": "CustomDialogExample_Button_off", + "value": "禁用" + }, + { + "name": "CustomDialogExampleUser_Status_true", + "value": "已启用" + }, + { + "name": "CustomDialogExampleUser_Status_false", + "value": "已禁用" + }, + { + "name": "CustomDialogExampleUser_Flex_firButton_text", + "value": "取消" + }, + { + "name": "CustomDialogExampleUser_Flex_secButton_text", + "value": "删除" + }, + { + "name": "CustomDialogExampleUser_warning_Button_text", + "value": "取消" + }, + { + "name": "CustomDialogExampleUser_warning_Button_title_text", + "value": "删除证书" + }, + { + "name": "CustomDialogExampleUser_warning_Button_message_text", + "value": "删除后,被授权此证书的应用将无法正常使用。是否删除?" + }, + { + "name": "CustomDialogExampleUser_warning_firButton_text", + "value": "取消" + }, + { + "name": "CustomDialogExampleUser_warning_secButton_text", + "value": "删除" + }, + { + "name": "DialogSubjectComponent_firText", + "value": "常用名称:" + }, + { + "name": "DialogSubjectComponent_secText", + "value": "组织:" + }, + { + "name": "DialogSubjectComponent_thdText", + "value": "组织单位:" + }, + { + "name": "DialogSubjectComponent_fouText", + "value": "序列号:" + }, + { + "name": "DialogSubjectComponent_fifText", + "value": "颁发时间:" + }, + { + "name": "DialogSubjectComponent_sixText", + "value": "有效期至:" + }, + { + "name": "CustomDialogExample_fouListItem_text", + "value": "指纹:" + }, + { + "name": "CustomDialogExample_FingerPrint_text", + "value": "SHA-256 指纹:" + } + ] +} \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_back.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_back.svg new file mode 100644 index 0000000..50e4ecd --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_back.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_back + + + + + + + + + + \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_close.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_close.svg new file mode 100644 index 0000000..e895e81 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_close.svg @@ -0,0 +1,3 @@ + + +_ic \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_delete.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_delete.svg new file mode 100644 index 0000000..1717615 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_delete.svg @@ -0,0 +1,13 @@ + + + xxxhdpi/ic_delete + + + + + + + + + + \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_move.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_move.svg new file mode 100644 index 0000000..578b6e5 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_move.svg @@ -0,0 +1 @@ +ic \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_public_cancel.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_public_cancel.svg new file mode 100644 index 0000000..7885cdc --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_public_cancel.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_cancel + + + + + + + + + + \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_public_close.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_public_close.svg new file mode 100644 index 0000000..cc18043 --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_public_close.svg @@ -0,0 +1,13 @@ + + + Public/ic_public_close + + + + + + + + + + \ No newline at end of file diff --git a/CertificateManager/product/phone/src/main/resources/base/media/ic_settings_arrow.svg b/CertificateManager/product/phone/src/main/resources/base/media/ic_settings_arrow.svg new file mode 100644 index 0000000..ff6293c --- /dev/null +++ b/CertificateManager/product/phone/src/main/resources/base/media/ic_settings_arrow.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + diff --git a/CertificateManager/product/phone/src/main/resources/base/media/icon.png b/CertificateManager/product/phone/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c GIT binary patch literal 6790 zcmX|G1ymHk)?T_}Vd;>R?p|tHQo6fg38|$UVM!6BLrPFWk?s;$LOP{GmJpBl$qoSA!PUg~PA65-S00{{S`XKG6NkG0RgjEntPrmV+?0|00mu7;+5 zrdpa{2QLqPJ4Y{j7=Mrl{BaxrkdY69+c~(w{F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ftW1LsI`< z@4k=Lmu=W~d+E~R+h;nbEWP)}!h@BQ?_E1_dF3~J>lP2dhcu_BYUKaW*i)O^kQ0U# z$O8luM9#l1Tk;F?<{Q7dR}*O5d0evb%HiVU=Sr?D_7xlZwbn~Z+s6lbb^khht#{0) z*UpWC&Fa_-F=}T`Vw1UdI{*HAj@?Jst}Xs3{K|!~*$EHcx@cID=wFFni95*^{*OiP zzVbyCl4W2}WUs;d0SG;pG7g-mgRdgpK``#|Riu!Gz_I^bU>IP+c;sVuAM%f6DUB27ZedO@Z+zVEnoH3`pvQ*o&PS|<$)+EWUOT%}yoogEohCM#X znQSdkGpFP|=(}HVbyBiR6CQuGCY&x>(tCDY`RqLtb{V~Vr|ZT{m~yqctTy=h{6lN* buHRP}RLpBD2ftEUcc + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index fe358dd..8594948 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,12 @@ -# security_privacy_center +# 安全隐私中心 -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +## 简介 -#### 软件架构 -软件架构说明 +### 内容介绍 + +安全隐私中心模块包含提供安全和隐私保护能力的系统应用。 -#### 安装教程 +### 目录 -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +[证书管理](CertificateManager/readme.md)