cd /usr/src/linux-headers-$(uname -r)/certs # Create a config file for the certificate cat < x509.genkey [ req ] default_bits = 4096 distinguished_name = req_distinguished_name prompt = no x509_extensions = myexts [ req_distinguished_name ] CN = Modules [ myexts ] basicConstraints=critical,CA:FALSE keyUsage=digitalSignature subjectKeyIdentifier=hash authorityKeyIdentifier=keyid EOF # Generate the key and certificate openssl req -new -nodes -utf8 -sha512 -days 36500 -batch \ -x509 -config x509.genkey -outform DER \ -out signing_key.x509 -keyout signing_key.pem