mirror of
https://gitee.com/openharmony/security_privacy_center
synced 2024-11-23 07:39:58 +00:00
!132 [新需求]: 支持安装crt和der格式的用户CA证书
Merge pull request !132 from HaixiangW/master
This commit is contained in:
commit
df4d0bc562
@ -15,6 +15,6 @@
|
||||
|
||||
export default class FilterParams {
|
||||
public static readonly MAX_SELECT_FILE_NUM = 1;
|
||||
public static readonly CERT_FILE_SUFFIX = ['.pem,.cer'];
|
||||
public static readonly CERT_FILE_SUFFIX = ['.pem,.cer,.crt,.der'];
|
||||
public static readonly CREDENTIAL_FILE_SUFFIX = ['.pfx,.p12'];
|
||||
}
|
@ -164,7 +164,7 @@ export struct CertInstallFromStorage {
|
||||
FileIoModel.getMediaFileSuffix(fileUri, (suffix: string | undefined) => {
|
||||
if (suffix !== undefined) {
|
||||
console.debug(TAG, 'suffix = ', suffix);
|
||||
if ((suffix === 'cer') || (suffix === 'pem')) {
|
||||
if ((suffix === 'cer') || (suffix === 'pem') || (suffix === 'crt') || (suffix === 'der')) {
|
||||
CmInstallPresenter.getInstance().installCert(fileUri, '', suffix, false);
|
||||
} else {
|
||||
this.mFaPresenter.unrecognizedFileTips();
|
||||
|
@ -65,7 +65,7 @@ export default class CmFaPresenter {
|
||||
FileIoModel.getMediaFileSuffix(fileUri, (suffix: string | undefined) => {
|
||||
if (suffix !== undefined) {
|
||||
console.debug(TAG, 'suffix = ', suffix);
|
||||
if ((suffix === 'cer') || (suffix === 'pem')) {
|
||||
if ((suffix === 'cer') || (suffix === 'pem') || (suffix === 'crt') || (suffix === 'der')) {
|
||||
CmInstallPresenter.getInstance().installCert(fileUri, '', suffix, true);
|
||||
} else {
|
||||
this.unrecognizedFileTips();
|
||||
|
@ -49,7 +49,7 @@ export default class CmInstallPresenter {
|
||||
|
||||
updateCertFileType(suffix: string): void {
|
||||
console.debug(TAG + 'updateCertFileType suffix: ' + suffix);
|
||||
if ((suffix === 'cer') || (suffix === 'pem')) {
|
||||
if ((suffix === 'cer') || (suffix === 'pem') || (suffix === 'crt') || (suffix === 'der')) {
|
||||
this.optType = CMModelOptType.CM_MODEL_OPT_USER_CA;
|
||||
} else if (((suffix === 'p12') || (suffix === 'jks') || (suffix === 'pfx')) &&
|
||||
AppStorage.get('installUserCred') === true) {
|
||||
|
Loading…
Reference in New Issue
Block a user