All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pgp.cert_d.cli.commands.List Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
// SPDX-FileCopyrightText: 2022 Paul Schaub 
//
// SPDX-License-Identifier: Apache-2.0

package pgp.cert_d.cli.commands;

import pgp.cert_d.cli.PGPCertDCli;
import pgp.certificate_store.certificate.Certificate;
import picocli.CommandLine;

import java.util.Iterator;

@CommandLine.Command(name = "list",
        resourceBundle = "msg_list"
)
public class List implements Runnable {

    @Override
    public void run() {
        Iterator certificates = PGPCertDCli.getCertificateDirectory()
                .items();
        while (certificates.hasNext()) {
            Certificate certificate = certificates.next();
            // CHECKSTYLE:OFF
            System.out.println(certificate.getFingerprint());
            // CHECKSTYLE:ON
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy