@@ -85,7 +85,7 @@ typedef struct TDEMapEntry
85
85
86
86
static void pg_tde_set_db_file_path (Oid dbOid , char * path );
87
87
static bool pg_tde_find_map_entry (const RelFileLocator * rlocator , char * db_map_path , TDEMapEntry * map_entry );
88
- static InternalKey * tde_decrypt_rel_key (TDEPrincipalKey * principal_key , TDEMapEntry * map_entry );
88
+ static InternalKey * tde_decrypt_rel_key (const TDEPrincipalKey * principal_key , TDEMapEntry * map_entry );
89
89
static int pg_tde_open_file_basic (const char * tde_filename , int fileFlags , bool ignore_missing );
90
90
static int pg_tde_open_file_read (const char * tde_filename , bool ignore_missing , off_t * curr_pos );
91
91
static void pg_tde_file_header_read (const char * tde_filename , int fd , TDEFileHeader * fheader , off_t * bytes_read );
@@ -96,7 +96,7 @@ static void pg_tde_write_one_map_entry(int fd, const TDEMapEntry *map_entry, off
96
96
static int pg_tde_file_header_write (const char * tde_filename , int fd , const TDESignedPrincipalKeyInfo * signed_key_info , off_t * bytes_written );
97
97
static void pg_tde_initialize_map_entry (TDEMapEntry * map_entry , const TDEPrincipalKey * principal_key , const RelFileLocator * rlocator , const InternalKey * rel_key_data );
98
98
static int pg_tde_open_file_write (const char * tde_filename , const TDESignedPrincipalKeyInfo * signed_key_info , bool truncate , off_t * curr_pos );
99
- static void pg_tde_write_key_map_entry (const RelFileLocator * rlocator , const InternalKey * rel_key_data , TDEPrincipalKey * principal_key );
99
+ static void pg_tde_write_key_map_entry (const RelFileLocator * rlocator , const InternalKey * rel_key_data , const TDEPrincipalKey * principal_key );
100
100
101
101
void
102
102
pg_tde_save_smgr_key (RelFileLocator rel , const InternalKey * rel_key_data )
@@ -243,7 +243,7 @@ pg_tde_free_key_map_entry(const RelFileLocator rlocator)
243
243
* Rotate keys and generates the WAL record for it.
244
244
*/
245
245
void
246
- pg_tde_perform_rotate_key (TDEPrincipalKey * principal_key , TDEPrincipalKey * new_principal_key , bool write_xlog )
246
+ pg_tde_perform_rotate_key (const TDEPrincipalKey * principal_key , const TDEPrincipalKey * new_principal_key , bool write_xlog )
247
247
{
248
248
TDESignedPrincipalKeyInfo new_signed_key_info ;
249
249
off_t old_curr_pos ,
@@ -451,7 +451,7 @@ pg_tde_write_one_map_entry(int fd, const TDEMapEntry *map_entry, off_t *offset,
451
451
* concurrent in place updates leading to data conflicts.
452
452
*/
453
453
void
454
- pg_tde_write_key_map_entry (const RelFileLocator * rlocator , const InternalKey * rel_key_data , TDEPrincipalKey * principal_key )
454
+ pg_tde_write_key_map_entry (const RelFileLocator * rlocator , const InternalKey * rel_key_data , const TDEPrincipalKey * principal_key )
455
455
{
456
456
char db_map_path [MAXPGPATH ];
457
457
int map_fd ;
@@ -579,7 +579,7 @@ pg_tde_verify_principal_key_info(TDESignedPrincipalKeyInfo *signed_key_info, con
579
579
}
580
580
581
581
static InternalKey *
582
- tde_decrypt_rel_key (TDEPrincipalKey * principal_key , TDEMapEntry * map_entry )
582
+ tde_decrypt_rel_key (const TDEPrincipalKey * principal_key , TDEMapEntry * map_entry )
583
583
{
584
584
InternalKey * rel_key_data = palloc_object (InternalKey );
585
585
0 commit comments