Home
last modified time | relevance | path

Searched refs:keyStorePath (Results 1 - 6 of 6) sorted by relevance

/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/
H A DKeyStoreHelper.java87 * Field keyStorePath.
89 private final String keyStorePath; field in KeyStoreHelper
104 * @param keyStorePath File path
107 public KeyStoreHelper(String keyStorePath, char[] storePwd) { in KeyStoreHelper() argument
109 ValidateUtils.throwIfMatches(StringUtils.isEmpty(keyStorePath), ERROR.COMMAND_ERROR, in KeyStoreHelper()
110 "Missed params: 'keyStorePath'"); in KeyStoreHelper()
115 this.keyStorePath = keyStorePath; in KeyStoreHelper()
116 this.keyStore = createKeyStoreAccordingFileType(keyStorePath); in KeyStoreHelper()
119 if (FileUtils.isFileExist(keyStorePath)) { in KeyStoreHelper()
[all...]
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/test/java/com/ohos/hapsigntool/
H A DKeyStoreTest.java50 String keyStorePath = "test_keypair.jks"; in testKeyStore()
53 if (FileUtils.isFileExist(keyStorePath)) { in testKeyStore()
54 Path path = Paths.get(keyStorePath); in testKeyStore()
58 KeyStoreHelper keyStoreHelper = new KeyStoreHelper(keyStorePath, pwd.toCharArray()); in testKeyStore()
61 KeyStoreHelper keyStore = new KeyStoreHelper(keyStorePath, pwd.toCharArray()); in testKeyStore()
/developtools/hapsigner/hapsigntool_cpp_test/unittest/generateKeyPair/
H A Dgenerate_keypair_test.cpp158 std::string keyStorePath = adaptePtr->options->GetString(Options::KEY_STORE_FILE); in HWTEST_F() local
191 std::string keyStorePath = adaptePtr->options->GetString(Options::KEY_STORE_FILE); in HWTEST_F() local
194 int ret = adaptePtr->keyStoreHelper->WriteKeyStore(keyPair, keyStorePath, in HWTEST_F()
228 std::string keyStorePath = adaptePtr->options->GetString(Options::KEY_STORE_FILE); in HWTEST_F() local
229 adaptePtr->keyStoreHelper->ReadKeyStore(keyStorePath, adaptePtr->options->GetChars(Options::KEY_STORE_RIGHTS), in HWTEST_F()
479 std::string keyStorePath = "./generateKeyPair/OpenHarmony.p12"; in HWTEST_F() local
487 keyhelper.CreatePKCS12(&p12, keyStorePath.c_str(), storePwd, keyPwd, alias.c_str(), keypair, cert); in HWTEST_F()
505 std::string keyStorePath = "./generateKeyPair/OpenHarmony11.p12"; in HWTEST_F() local
511 int ret = keyhelper.CreatePKCS12(&p12, keyStorePath.c_str(), storePwd, keyPwd, alias.c_str(), keypair, cert); in HWTEST_F()
541 std::string keyStorePath in HWTEST_F() local
565 std::string keyStorePath = "./generateKeyPair/OpenHarmonyNullpwd.p12"; HWTEST_F() local
588 std::string keyStorePath = "./generateKeyPair/OpenHarmonyNullpwd.p12"; HWTEST_F() local
728 std::string keyStorePath = "./generateKeyPair/OpenHarmony.p12"; HWTEST_F() local
753 std::string keyStorePath = "./generateKeyPair/OpenHarmony.p12"; HWTEST_F() local
777 std::string keyStorePath = "./generateKeyPair/OpenHarmony.p12"; HWTEST_F() local
801 std::string keyStorePath = "./generateKeyPair/OpenHarmony.p12"; HWTEST_F() local
[all...]
/developtools/hapsigner/hapsigntool_cpp/utils/include/
H A Dkey_store_helper.h32 int WriteKeyStore(EVP_PKEY* evpPkey, std::string& keyStorePath, char* keyStorePwd,
34 int ReadKeyStore(std::string& keyStorePath, char* keyStorePwd, const std::string& alias,
46 EVP_PKEY** keyPiar, const std::string& keyStorePath);
55 bool IsKeyStoreFileExist(std::string& keyStorePath);
77 void PrintAliasExistErrorMsg(const std::string& alias, const std::string& keyStorePath);
/developtools/hapsigner/hapsigntool_cpp/utils/src/
H A Dkey_store_helper.cpp59 void KeyStoreHelper::PrintAliasExistErrorMsg(const std::string& alias, const std::string& keyStorePath) in PrintAliasExistErrorMsg() argument
63 + alias + "' is not exist in" + keyStorePath); in PrintAliasExistErrorMsg()
229 char* keyStorePwd, EVP_PKEY** keyPiar, const std::string& keyStorePath) in FindKeyPair()
277 PrintAliasExistErrorMsg(alias, keyStorePath); in FindKeyPair()
363 int KeyStoreHelper::WriteKeyStore(EVP_PKEY* evpPkey, std::string& keyStorePath, in WriteKeyStore() argument
380 if (CreatePKCS12(&p12, keyStorePath, keyStorePwd, keyPwd, alias.c_str(), evpPkey, cert) == RET_FAILED) { in WriteKeyStore()
385 bioOut = BIO_new_file(keyStorePath.c_str(), "wb"); in WriteKeyStore()
387 KeyPairFree(cert, p12, bioOut, "Open file: '" + keyStorePath + "' failed"); in WriteKeyStore()
442 int KeyStoreHelper::ReadKeyStore(std::string& keyStorePath, char* keyStorePwd, const std::string& alias, in ReadKeyStore() argument
449 bioOut = BIO_new_file(keyStorePath in ReadKeyStore()
228 FindKeyPair(PKCS12* p12, const std::string& alias, char* keyPwd, char* keyStorePwd, EVP_PKEY** keyPiar, const std::string& keyStorePath) FindKeyPair() argument
498 IsKeyStoreFileExist(std::string& keyStorePath) IsKeyStoreFileExist() argument
[all...]
/developtools/hapsigner/hapsigntool_cpp/common/src/
H A Dlocalization_adapter.cpp114 std::string keyStorePath = ""; in KeyStoreFile() local
115 keyStorePath = options->GetString(Options::KEY_STORE_FILE); in KeyStoreFile()
119 bool fileStatus = keyStoreHelper->IsKeyStoreFileExist(keyStorePath); in KeyStoreFile()
121 int status = keyStoreHelper->ReadKeyStore(keyStorePath, keyStorePwd, keyAlias, keyPwd, keyPair); in KeyStoreFile()
134 int status = keyStoreHelper->WriteKeyStore(*keyPair, keyStorePath, keyStorePwd, keyAlias, keyPwd); in KeyStoreFile()

Completed in 12 milliseconds