Skip to content

Commit

Permalink
Fix default global principal key info
Browse files Browse the repository at this point in the history
  • Loading branch information
dAdAbird committed Jul 18, 2024
1 parent bcb2545 commit 8d960ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/catalog/tde_global_space.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ create_principal_key(const char *key_name, GenericKeyring * keyring,
principalKey->keyInfo.keyId.version = DEFAULT_PRINCIPAL_KEY_VERSION;
principalKey->keyInfo.keyringId = keyring->key_id;
strncpy(principalKey->keyInfo.keyId.name, key_name, TDE_KEY_NAME_LEN);
snprintf(principalKey->keyInfo.keyId.versioned_name, TDE_KEY_NAME_LEN,
"%s_%d", principalKey->keyInfo.keyId.name, principalKey->keyInfo.keyId.version);
gettimeofday(&principalKey->keyInfo.creationTime, NULL);

keyInfo = KeyringGenerateNewKeyAndStore(keyring, principalKey->keyInfo.keyId.versioned_name, INTERNAL_KEY_LEN, false);
Expand Down

0 comments on commit 8d960ae

Please sign in to comment.