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

org.bouncycastle.est.ESTServiceBuilder Maven / Gradle / Ivy

Go to download

The Bouncy Castle Java APIs for CMS, PKCS, EAC, TSP, CMP, CRMF, OCSP, and certificate generation. This jar contains APIs for JDK 1.5 to JDK 11. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.

There is a newer version: 1.70
Show newest version
package org.bouncycastle.est;


/**
 * Build an RFC7030 (EST) service.
 */
public class ESTServiceBuilder
{
    protected final String server;
    protected ESTClientProvider clientProvider;
    protected String label;

    /**
     * With scheme and host..
     *
     * @param server The authority name, eg estserver.co.au
     */
    public ESTServiceBuilder(String server)
    {
        this.server = server;
    }

    /**
     * Set the label as per https://tools.ietf.org/html/rfc7030#section-3.2.2
     *
     * @param label The label.
     * @return this builder.
     */
    public ESTServiceBuilder withLabel(String label)
    {
        this.label = label;
        return this;
    }

    /**
     * Set the client provider.
     *
     * @param clientProvider The client provider.
     * @return
     */
    public ESTServiceBuilder withClientProvider(ESTClientProvider clientProvider)
    {
        this.clientProvider = clientProvider;
        return this;
    }

    /**
     * Build the service.
     *
     * @return an ESTService.
     */
    public ESTService build()
    {
        return new ESTService(
            server,
            label,
            clientProvider);
    }

}







© 2015 - 2024 Weber Informatics LLC | Privacy Policy