Skip to content

Latest commit

 

History

History

wkd-test-suite

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

WKD Test Suite Generator

javadoc Maven Central

This module contains a CLI application that can be used to generate WKD test vectors.

$ java -jar wkd-test-suite.jar help
Usage: wkd-test-suite [-hV] [--json-summary[=<jsonOutputFiles>]]...
                      [--xml-summary[=<xmlOutputFiles>]]... -d=<domain>
                      [-m={direct|advanced}] -o=<rootDir>
  -d, --domain=<domain>   Root domain
  -h, --help              Show this help message and exit.
      --json-summary[=<jsonOutputFiles>]
                          Write JSON summary to file
  -m, --method={direct|advanced}
                          Method for key discovery
  -o, --output-dir=<rootDir>
                          Output directory
  -V, --version           Print version information and exit.
      --xml-summary[=<xmlOutputFiles>]
                          Write XML summary to file

Example output summary.json:

{
  "version" : "0.1",
  "testCases" : [ {
    "expectSuccess" : true,
    "testTitle" : "Base Case",
    "testDescription" : "Certificate has a single, valid user-id 'WKD-Test Base Case <[email protected]>'",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/6q1ubufxsqh8fjuewbachy5ocz9seanp",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/6q1ubufxsqh8fjuewbachy5ocz9seanp?l=base-case"
  }, {
    "expectSuccess" : false,
    "testTitle" : "Wrong User-ID",
    "testDescription" : "Certificate has a single, valid user-id 'WKD-Test Different User-ID <[email protected]>', but is deposited for mail address '[email protected]'.",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/87rxmyhh4paokf1apw6qiej8hk6nwuxy",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/87rxmyhh4paokf1apw6qiej8hk6nwuxy?l=wrong-userid"
  }, {
    "expectSuccess" : false,
    "testTitle" : "No User-ID",
    "testDescription" : "Certificate has no user-id, but is deposited for mail address '[email protected]'.",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/caky1x1mawkc6gg4kge1icod96wqaeax",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/caky1x1mawkc6gg4kge1icod96wqaeax?l=absent-userid"
  }, {
    "expectSuccess" : true,
    "testTitle" : "Multi-User-ID - Primary User-ID Lookup",
    "testDescription" : "Certificate has multiple, valid user-ids. Is looked up via primary user-id 'WKD-Test Primary User-ID <[email protected]>' using mail address '[email protected]'.",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/iz5jxf9oi1mbc1p45s3nxcuxn38qazkw",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/iz5jxf9oi1mbc1p45s3nxcuxn38qazkw?l=primary-uid"
  }, {
    "expectSuccess" : true,
    "testTitle" : "Multi-User-ID - Secondary User-ID Lookup",
    "testDescription" : "Certificate has multiple, valid user-ids. Is looked up via secondary user-id 'WKD-Test Secondary User-ID <[email protected]>' using mail address '[email protected]'.",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/34i6oasjuzeunw5uwam7yqbtit1rtmjp",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/34i6oasjuzeunw5uwam7yqbtit1rtmjp?l=secondary-uid"
  }, {
    "expectSuccess" : false,
    "testTitle" : "Secret Key Material",
    "testDescription" : "Certificate file contains secret key material.",
    "lookupMailAddress" : "[email protected]",
    "certificatePath" : ".well-known/openpgpkey/hu/4uoqyth19ibwszqjaokiafhxc5sh6usu",
    "lookupUri" : "https://pgpainless.github.io/.well-known/openpgpkey/hu/4uoqyth19ibwszqjaokiafhxc5sh6usu?l=test-secret-key"
  } ]
}