java-ers-lib

The java-ers-lib is used to write Java applications that implement the functionality of the Emergency Recovery Service (ERS).

Getting Started

To fetch the java-ers-lib you need credentials for the Sepior Nexus server.

Maven Project

To be able to get the java-ers-lib first configure your $HOME/.m2/settings.xml file with credentials for the Nexus server, e.g.:

<settings>
    <servers>
        <server>
            <id>sepior-server</id>
            <username>$NEXUS_USER</username>
            <password>$NEXUS_PASSWORD</password>
        </server>
    </servers>
</settings>

Then add the following repositories and dependencies to your pom.xml file:

<repositories>
    <repository>
        <id>maven-public</id>
        <url>https://nexus.sepior.net/repository/maven-public</url>
    </repository>
    <repository>
        <id>sepior-server</id>
        <url>https://nexus.sepior.net/repository/sepior-tdsa-lib</url>
    </repository>
</repositories>

...

<properties>
    <java-ers-lib.version>X.Y.Z</java-ers-lib.version>
</properties>

...

<dependency>
    <groupId>com.sepior.ers</groupId>
    <artifactId>java-ers-lib</artifactId>
    <version>${java-ers-lib.version}</version>
</dependency>

That's it. You can now run

mvn install

Main Class

The API is described using Javadoc which can be obtained from the Nexus Server. The ErsClient interface is used to integrate the library into an application:

To get an instantiation of this class you need to know the protocol ID of the protocol you need to recover keys from as well as the ERS private RSA key in DER encoded form.

Example

ErsClient ersClient = new ErsClientFactory().create("SEPH18S-3-1", derEncodedPrivateKey);

What’s Next