sbool getAuthorOfSignedJava_debug; static S getAuthorOfSignedJava(S signed) { try { L lines = toLines(signed); S authorLine = lines.get(lines.size()-2); S sigLine = lines.get(lines.size()-1); S text = fromLines(lines.subList(0, lines.size()-1)); S author = dropPrefixMandatory("// -", authorLine); if (!isComputerID(author)) fail("Not a computer ID: " + author); S publicKey = getPublicKeyOfComputer(author); if (publicKey == null) fail("Computer " + author + " has to publish a public key."); S sig = dropPrefixMandatory("// sig: ", sigLine); if (PKI.verifySignature(PKI.publicKeyFromString(publicKey), PKI.signatureFromString(sig), toUtf8(text))) ret author; else ret null; } catch (RuntimeException e) { ret null; } }