Package org.apache.james.jdkim.api

Examples of org.apache.james.jdkim.api.PublicKeyRecordRetriever


     * TODO: Requires internet connection
     *
     * @throws PermFailException
     */
    public void testRetrieve() throws TempFailException, PermFailException {
        PublicKeyRecordRetriever pkr = new DNSPublicKeyRecordRetriever();
        pkr.getRecords("dns/txt", "lima", "yahoogroups.com");
        pkr.getRecords("dns/txt", "gamma", "gmail.com");

        new TagValue((String) pkr.getRecords("dns/txt", "lima",
                "yahoogroups.com").get(0));
    }
View Full Code Here


        PermFailException lastPermFailure = null;
        for (Iterator<CharSequence> rlm = sign.getRecordLookupMethods().iterator(); key == null
                && rlm.hasNext();) {
            CharSequence method = rlm.next();
            try {
                PublicKeyRecordRetriever pkrr = getPublicKeyRecordRetriever();
                List<String> records = pkrr.getRecords(method, sign.getSelector()
                        .toString(), sign.getDToken().toString());
                PublicKeyRecord tempKey = publicKeySelector(records);
                // checks wether the key is applicable to the signature
                // TODO check with the IETF group to understand if this is the
                // right thing to do.
View Full Code Here

    public List<String> getRecords(CharSequence methodAndOption, CharSequence selector,
            CharSequence token) throws TempFailException, PermFailException {
        int pos = methodAndOption.toString().indexOf('/');
        String method = pos != -1 ? methodAndOption.subSequence(0, pos)
                .toString() : methodAndOption.toString();
        PublicKeyRecordRetriever pkrr = retrievers.get(method);
        if (pkrr != null) {
            return pkrr.getRecords(methodAndOption, selector, token);
        } else {
            throw new PermFailException(
                    "Unknown public key record retrieving method: "
                            + methodAndOption);
        }
View Full Code Here

TOP

Related Classes of org.apache.james.jdkim.api.PublicKeyRecordRetriever

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.