@@ -17,6 +17,8 @@ var bucketCmd = &cobra.Command{
1717 Long : `Manage APK repository buckets (sources) for the client functionality.` ,
1818}
1919
20+ var bucketVerifySignature bool
21+
2022var bucketListCmd = & cobra.Command {
2123 Use : "list" ,
2224 Short : "List all configured buckets" ,
@@ -108,6 +110,7 @@ var bucketAddCmd = &cobra.Command{
108110 // Update bucket index
109111 fmt .Printf ("Fetching bucket manifest...\n " )
110112 bucketMgr := client .NewBucketManager (config )
113+ bucketMgr .SetSignatureVerification (bucketVerifySignature && config .Security .VerifySignature )
111114 if _ , err := bucketMgr .FetchManifest (name ); err != nil {
112115 fmt .Printf ("Warning: Failed to fetch manifest: %v\n " , err )
113116 fmt .Println ("You can try updating later with 'apkhub bucket update'" )
@@ -169,6 +172,7 @@ var bucketUpdateCmd = &cobra.Command{
169172 }
170173
171174 bucketMgr := client .NewBucketManager (config )
175+ bucketMgr .SetSignatureVerification (bucketVerifySignature && config .Security .VerifySignature )
172176
173177 if len (args ) > 0 {
174178 // Update specific bucket
@@ -517,6 +521,8 @@ func formatBytes(bytes int64) string {
517521func init () {
518522 rootCmd .AddCommand (bucketCmd )
519523
524+ bucketCmd .PersistentFlags ().BoolVar (& bucketVerifySignature , "verify-signature" , true , "Verify bucket manifest signatures (set false to bypass)" )
525+
520526 // Add subcommands
521527 bucketCmd .AddCommand (bucketListCmd )
522528 bucketCmd .AddCommand (bucketAddCmd )
0 commit comments