Skip to content
Snippets Groups Projects
Commit 6cc1755f authored by Marco Holz's avatar Marco Holz
Browse files

Fix link, URL and minor wording

parent 331f1321
No related branches found
No related tags found
1 merge request!123Prüfung DVDV-Signature
......@@ -369,11 +369,11 @@ Dabei setzt sich der Endpunkt aus dem Attribut `submissionUrl` + '/.well-known/j
Vor der eigentlichen Signaturprüfung muss die Einhaltung einiger Grundvoraussetzungen geprüft werden:
1. Prüfung auf erlaubten Algorithmus `PS512` im Header des JWT gemäß den [Vorgaben für kryptographische Verfahren](../crypto/details.md).
1. Prüfung auf erlaubten Algorithmus `PS512` im Header des JWT gemäß den [Vorgaben für kryptographische Verfahren](../details/crypto.md).
2. Erweiterung der URL des zuständigen Zustelldienstes (`submissionUrl`) aus dem Payload des JWT (`destinationParameters`) um den Pfad `/.well-known/jwks.json`. Dabei muss geprüft werden, ob die URL zu einem vertrauenswürdigen Zustelldienst gehört.
3. Ermitteln des öffentlichen Schlüssel über die Key-ID (`kid`), die im Header des JSON Web Signature hinterlegt ist.
4. Prüfung dass der öffentliche Schlüssel eine Länge von 4096 bit besitzt.
5. Prüfung das der öffentliche Schlüssel eine Verwendung des Algorithmus `PS512` erlaubt.
4. Prüfung, dass der öffentliche Schlüssel eine Länge von 4096 bit besitzt.
5. Prüfung, dass der öffentliche Schlüssel eine Verwendung des Algorithmus `PS512` erlaubt.
6. Prüfung der Signatur.
<Tabs
......@@ -388,7 +388,7 @@ Vor der eigentlichen Signaturprüfung muss die Einhaltung einiger Grundvorausset
private final static int PUBLICKEYSIZE = 4096;
private final static String DVDV_SUBMISSIONURL_KEY = "submissionUrl";
private final static String KEYSTORE_URL_ENDING = ".well-known/jwks.json";
private final static String[] VALID_KEYSTORE_URLS = new String[]{ "https://submission-api.fit-connect.example.org/v1/.well-known/jwks.json"};
private final static String[] VALID_KEYSTORE_URLS = new String[]{ "https://submission-api-testing.fit-connect.fitko.dev/v1/.well-known/jwks.json"};
protected void validateBySignedJWT(SignedJWT signedJWT) throws BadJOSEException, JOSEException, IOException, ParseException
{
......@@ -419,7 +419,7 @@ protected void validateBySignedJWT(SignedJWT signedJWT) throws BadJOSEException,
//4. Public Key muss eine Länge von 4096 bit haben!
if ( PUBLICKEYSIZE != publicKey.size() )
throw new RuntimeException("The key specified for signature verification has'nt the size of 4096 bit.");
throw new RuntimeException("The key specified for signature verification is not of size 4096 bit.");
//5. Der PublicKey muss den Algorithmus PS512 verwenden!
if( !JWSAlgorithm.PS512.equals(publicKey.getAlgorithm()) )
......@@ -462,7 +462,6 @@ protected void validateBySignedJWT(SignedJWT signedJWT) throws BadJOSEException,
if ( !VALID_KEYSTORE_URLS.contains(String.valueOf(url)) )
throw new RuntimeException("KeyStoreUrl not valid!");
}
```
</TabItem>
</Tabs>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment