1 /* 2 * Copyright (c) 2024-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 16 #ifndef SIGNERTOOLS_SERVICE_API_H 17 #define SIGNERTOOLS_SERVICE_API_H 18 19 #include "options.h" 20 21 namespace OHOS { 22 namespace SignatureTools { 23 24 class ServiceApi { 25 public: 26 ServiceApi() = default; 27 ~ServiceApi() = default; 28 29 virtual bool GenerateKeyStore(Options* params) = 0; 30 virtual bool GenerateCsr(Options* params) = 0; 31 virtual bool GenerateCert(Options* params) = 0; 32 virtual bool GenerateCA(Options* params) = 0; 33 virtual bool GenerateAppCert(Options* params) = 0; 34 virtual bool GenerateProfileCert(Options* params) = 0; 35 virtual bool SignProfile(Options* params) = 0; 36 virtual bool VerifyProfile(Options* params) = 0; 37 virtual bool SignHap(Options* params) = 0; 38 virtual bool VerifyHapSigner(Options* params) = 0; 39 }; 40 } // namespace SignatureTools 41 } // namespace OHOS 42 #endif // SIGNERTOOLS_SERVICE_API_H