1/** 2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16export class CertInfoVo { 17 public uri: string; 18 public certAlias: string; 19 public status: boolean; 20 public issuerName: string; 21 public subjectName: string; 22 public serial: string; 23 public notBefore: string; 24 public notAfter: string; 25 public fingerprintSha256: string; 26 public cert: Uint8Array; 27 public subjectNameMap: Map<string, string>; 28 public issuerNameMap: Map<string, string>; 29 public dateMap: Map<string, string>; 30 31 constructor( 32 uri: string, 33 certAlias: string, 34 status: boolean, 35 issuerName: string, 36 subjectName: string, 37 serial: string, 38 notBefore: string, 39 notAfter: string, 40 fingerprintSha256: string, 41 cert: Uint8Array, 42 subjectNameMap: Map<string, string>, 43 issuerNameMap: Map<string, string>, 44 dateMap: Map<string, string>) { 45 this.uri = uri; 46 this.certAlias = certAlias; 47 this.status = status; 48 this.issuerName = issuerName; 49 this.subjectName = subjectName; 50 this.serial = serial; 51 this.notBefore = notBefore; 52 this.notAfter = notAfter; 53 this.fingerprintSha256 = fingerprintSha256; 54 this.cert = cert; 55 this.subjectNameMap = subjectNameMap; 56 this.issuerNameMap = issuerNameMap; 57 this.dateMap = dateMap; 58 } 59 60 clearCertInfoVo(): void { 61 this.uri = ''; 62 this.certAlias = ''; 63 this.status = false; 64 this.issuerName = ''; 65 this.subjectName = ''; 66 this.serial = ''; 67 this.notBefore = ''; 68 this.notAfter = ''; 69 this.fingerprintSha256 = ''; 70 this.cert = new Uint8Array(); 71 this.subjectNameMap.clear(); 72 this.issuerNameMap.clear(); 73 this.dateMap.clear(); 74 } 75}