aboutsummaryrefslogtreecommitdiff
path: root/b4/attest.py
diff options
context:
space:
mode:
Diffstat (limited to 'b4/attest.py')
-rw-r--r--b4/attest.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/b4/attest.py b/b4/attest.py
deleted file mode 100644
index a6acb28..0000000
--- a/b4/attest.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-# SPDX-License-Identifier: GPL-2.0-or-later
-# Copyright (C) 2020 by the Linux Foundation
-#
-
-import sys
-import b4
-import argparse
-try:
- import patatt
- can_patatt = True
-except ModuleNotFoundError:
- can_patatt = False
-
-from collections import namedtuple
-
-logger = b4.logger
-
-
-def attest_patches(cmdargs: argparse.Namespace) -> None:
- if not can_patatt:
- logger.critical('ERROR: b4 now uses patatt for patch attestation. See:')
- logger.critical(' https://git.kernel.org/pub/scm/utils/patatt/patatt.git/about/')
- sys.exit(1)
-
- # directly invoke cmd_sign in patatt
- config = patatt.get_config_from_git(r'patatt\..*', multivals=['keyringsrc'])
- fakeargs = namedtuple('Struct', ['hookmode', 'msgfile'])
- fakeargs.hookmode = True
- fakeargs.msgfile = cmdargs.patchfile
- patatt.cmd_sign(fakeargs, config)