)]}'
{
  "commit": "22d01afb210ff77fc480a1fc531cd59a4f32157a",
  "tree": "b4bd45cc0b35d123e5018214e345df5600e02988",
  "parents": [
    "08815b62d700e4fbeb72a01986ad051c3dd84a15"
  ],
  "author": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Tue Jul 01 19:06:18 2014 +0100"
  },
  "committer": {
    "name": "David Howells",
    "email": "dhowells@redhat.com",
    "time": "Tue Jul 08 13:50:20 2014 +0100"
  },
  "message": "PKCS#7: Provide a key type for testing PKCS#7\n\nProvide a key type for testing the PKCS#7 parser.  It is given a non-detached\nPKCS#7 message as payload:\n\n\tkeyctl padd pkcs7_test a @s \u003cstuff.pkcs7\n\nThe PKCS#7 wrapper is validated against the trusted certificates available and\nthen stripped off.  If successful, the key can be read, which will give the\ndata content of the PKCS#7 message.\n\nA suitable message can be created by running make on the attached Makefile.\nThis will produce a file called stuff.pkcs7 for test loading.  The key3.x509\nfile should be put into the kernel source tree before it is built and\nconverted to DER form:\n\n\topenssl x509 -in .../pkcs7/key3.x509 -outform DER -out key3.x509\n\n###############################################################################\n#\n# Create a pkcs7 message and sign it twice\n#\n#\topenssl x509 -text -inform PEM -noout -in key2.x509\n#\n###############################################################################\nstuff.pkcs7: stuff.txt key2.priv key2.x509 key4.priv key4.x509 certs\n\t$(RM) $@\n\topenssl smime -sign \\\n\t\t-signer key2.x509 \\\n\t\t-inkey key2.priv \\\n\t\t-signer key4.x509 \\\n\t\t-inkey key4.priv \\\n\t\t-in stuff.txt \\\n\t\t-certfile certs \\\n\t\t-out $@ -binary -outform DER -nodetach\n\topenssl pkcs7 -inform DER -in stuff.pkcs7  -print_certs -noout\n\topenssl asn1parse -inform DER -in stuff.pkcs7  -i \u003eout\n\nstuff.txt:\n\techo \"The quick red fox jumped over the lazy brown dog\" \u003estuff.txt\n\ncerts: key1.x509 key2.x509 key3.x509 key4.x509\n\tcat key{1,3}.x509 \u003e$@\n\n###############################################################################\n#\n# Generate a signed key\n#\n#\topenssl x509 -text -inform PEM -noout -in key2.x509\n#\n###############################################################################\nkey2.x509: key2.x509_unsigned key1.priv key1.x509\n\topenssl x509 \\\n\t\t-req -in key2.x509_unsigned \\\n\t\t-out key2.x509 \\\n\t\t-extfile key2.genkey -extensions myexts \\\n\t\t-CA key1.x509 \\\n\t\t-CAkey key1.priv \\\n\t\t-CAcreateserial\n\nkey2.priv key2.x509_unsigned: key2.genkey\n\topenssl req -new -nodes -utf8 -sha1 -days 36500 \\\n\t\t-batch -outform PEM \\\n\t\t-config key2.genkey \\\n\t\t-keyout key2.priv \\\n\t\t-out key2.x509_unsigned\n\nkey2.genkey:\n\t@echo Generating X.509 key generation config\n\t@echo  \u003e$@ \"[ req ]\"\n\t@echo \u003e\u003e$@ \"default_bits \u003d 4096\"\n\t@echo \u003e\u003e$@ \"distinguished_name \u003d req_distinguished_name\"\n\t@echo \u003e\u003e$@ \"prompt \u003d no\"\n\t@echo \u003e\u003e$@ \"string_mask \u003d utf8only\"\n\t@echo \u003e\u003e$@ \"x509_extensions \u003d myexts\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ req_distinguished_name ]\"\n\t@echo \u003e\u003e$@ \"O \u003d Magrathea\"\n\t@echo \u003e\u003e$@ \"CN \u003d PKCS7 key 2\"\n\t@echo \u003e\u003e$@ \"emailAddress \u003d slartibartfast@magrathea.h2g2\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ myexts ]\"\n\t@echo \u003e\u003e$@ \"basicConstraints\u003dcritical,CA:FALSE\"\n\t@echo \u003e\u003e$@ \"keyUsage\u003ddigitalSignature\"\n\t@echo \u003e\u003e$@ \"subjectKeyIdentifier\u003dhash\"\n\t@echo \u003e\u003e$@ \"authorityKeyIdentifier\u003dkeyid\"\n\n###############################################################################\n#\n# Generate a couple of signing keys\n#\n#\topenssl x509 -text -inform PEM -noout -in key1.x509\n#\n###############################################################################\nkey1.x509: key1.x509_unsigned key4.priv key4.x509\n\topenssl x509 \\\n\t\t-req -in key1.x509_unsigned \\\n\t\t-out key1.x509 \\\n\t\t-extfile key1.genkey -extensions myexts \\\n\t\t-CA key4.x509 \\\n\t\t-CAkey key4.priv \\\n\t\t-CAcreateserial\n\nkey1.priv key1.x509_unsigned: key1.genkey\n\topenssl req -new -nodes -utf8 -sha1 -days 36500 \\\n\t\t-batch -outform PEM \\\n\t\t-config key1.genkey \\\n\t\t-keyout key1.priv \\\n\t\t-out key1.x509_unsigned\n\nkey1.genkey:\n\t@echo Generating X.509 key generation config\n\t@echo  \u003e$@ \"[ req ]\"\n\t@echo \u003e\u003e$@ \"default_bits \u003d 4096\"\n\t@echo \u003e\u003e$@ \"distinguished_name \u003d req_distinguished_name\"\n\t@echo \u003e\u003e$@ \"prompt \u003d no\"\n\t@echo \u003e\u003e$@ \"string_mask \u003d utf8only\"\n\t@echo \u003e\u003e$@ \"x509_extensions \u003d myexts\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ req_distinguished_name ]\"\n\t@echo \u003e\u003e$@ \"O \u003d Magrathea\"\n\t@echo \u003e\u003e$@ \"CN \u003d PKCS7 key 1\"\n\t@echo \u003e\u003e$@ \"emailAddress \u003d slartibartfast@magrathea.h2g2\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ myexts ]\"\n\t@echo \u003e\u003e$@ \"basicConstraints\u003dcritical,CA:TRUE\"\n\t@echo \u003e\u003e$@ \"keyUsage\u003ddigitalSignature,keyCertSign\"\n\t@echo \u003e\u003e$@ \"subjectKeyIdentifier\u003dhash\"\n\t@echo \u003e\u003e$@ \"authorityKeyIdentifier\u003dkeyid\"\n\n###############################################################################\n#\n# Generate a signed key\n#\n#\topenssl x509 -text -inform PEM -noout -in key4.x509\n#\n###############################################################################\nkey4.x509: key4.x509_unsigned key3.priv key3.x509\n\topenssl x509 \\\n\t\t-req -in key4.x509_unsigned \\\n\t\t-out key4.x509 \\\n\t\t-extfile key4.genkey -extensions myexts \\\n\t\t-CA key3.x509 \\\n\t\t-CAkey key3.priv \\\n\t\t-CAcreateserial\n\nkey4.priv key4.x509_unsigned: key4.genkey\n\topenssl req -new -nodes -utf8 -sha1 -days 36500 \\\n\t\t-batch -outform PEM \\\n\t\t-config key4.genkey \\\n\t\t-keyout key4.priv \\\n\t\t-out key4.x509_unsigned\n\nkey4.genkey:\n\t@echo Generating X.509 key generation config\n\t@echo  \u003e$@ \"[ req ]\"\n\t@echo \u003e\u003e$@ \"default_bits \u003d 4096\"\n\t@echo \u003e\u003e$@ \"distinguished_name \u003d req_distinguished_name\"\n\t@echo \u003e\u003e$@ \"prompt \u003d no\"\n\t@echo \u003e\u003e$@ \"string_mask \u003d utf8only\"\n\t@echo \u003e\u003e$@ \"x509_extensions \u003d myexts\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ req_distinguished_name ]\"\n\t@echo \u003e\u003e$@ \"O \u003d Magrathea\"\n\t@echo \u003e\u003e$@ \"CN \u003d PKCS7 key 4\"\n\t@echo \u003e\u003e$@ \"emailAddress \u003d slartibartfast@magrathea.h2g2\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ myexts ]\"\n\t@echo \u003e\u003e$@ \"basicConstraints\u003dcritical,CA:TRUE\"\n\t@echo \u003e\u003e$@ \"keyUsage\u003ddigitalSignature,keyCertSign\"\n\t@echo \u003e\u003e$@ \"subjectKeyIdentifier\u003dhash\"\n\t@echo \u003e\u003e$@ \"authorityKeyIdentifier\u003dkeyid\"\n\n###############################################################################\n#\n# Generate a couple of signing keys\n#\n#\topenssl x509 -text -inform PEM -noout -in key3.x509\n#\n###############################################################################\nkey3.priv key3.x509: key3.genkey\n\topenssl req -new -nodes -utf8 -sha1 -days 36500 \\\n\t\t-batch -x509 -outform PEM \\\n\t\t-config key3.genkey \\\n\t\t-keyout key3.priv \\\n\t\t-out key3.x509\n\nkey3.genkey:\n\t@echo Generating X.509 key generation config\n\t@echo  \u003e$@ \"[ req ]\"\n\t@echo \u003e\u003e$@ \"default_bits \u003d 4096\"\n\t@echo \u003e\u003e$@ \"distinguished_name \u003d req_distinguished_name\"\n\t@echo \u003e\u003e$@ \"prompt \u003d no\"\n\t@echo \u003e\u003e$@ \"string_mask \u003d utf8only\"\n\t@echo \u003e\u003e$@ \"x509_extensions \u003d myexts\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ req_distinguished_name ]\"\n\t@echo \u003e\u003e$@ \"O \u003d Magrathea\"\n\t@echo \u003e\u003e$@ \"CN \u003d PKCS7 key 3\"\n\t@echo \u003e\u003e$@ \"emailAddress \u003d slartibartfast@magrathea.h2g2\"\n\t@echo \u003e\u003e$@\n\t@echo \u003e\u003e$@ \"[ myexts ]\"\n\t@echo \u003e\u003e$@ \"basicConstraints\u003dcritical,CA:TRUE\"\n\t@echo \u003e\u003e$@ \"keyUsage\u003ddigitalSignature,keyCertSign\"\n\t@echo \u003e\u003e$@ \"subjectKeyIdentifier\u003dhash\"\n\t@echo \u003e\u003e$@ \"authorityKeyIdentifier\u003dkeyid\"\n\nclean:\n\t$(RM) *~\n\t$(RM) key1.* key2.* key3.* key4.* stuff.* out certs\n\nSigned-off-by: David Howells \u003cdhowells@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a7cec9dd61549918d2f924832d67c7e58c552739",
      "old_mode": 33188,
      "old_path": "crypto/asymmetric_keys/Kconfig",
      "new_id": "b6df198d1b6f776cae0f8b3023db10df864fe5d7",
      "new_mode": 33188,
      "new_path": "crypto/asymmetric_keys/Kconfig"
    },
    {
      "type": "modify",
      "old_id": "d63cb4320b9620fd77644ac144ed117923069a8d",
      "old_mode": 33188,
      "old_path": "crypto/asymmetric_keys/Makefile",
      "new_id": "92d0e9af24d57b47807eb53334b89bbef71910f2",
      "new_mode": 33188,
      "new_path": "crypto/asymmetric_keys/Makefile"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b1797d2516e27bf967808c3e181a67ac9ff6b177",
      "new_mode": 33188,
      "new_path": "crypto/asymmetric_keys/pkcs7_key_type.c"
    }
  ]
}
