Add javadoc and source jars generation. Fixing errors and warnings.
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
This commit is contained in:
parent
2153452545
commit
db57253657
|
|
@ -15,6 +15,11 @@ subprojects {
|
|||
|
||||
apply plugin: 'java-library'
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
|
|
|
|||
|
|
@ -106,8 +106,6 @@ public class CertificateUtils {
|
|||
* @param chain the certificate chain
|
||||
* @param trustedCerts to validate the certificate chain
|
||||
* @throws CertificateException
|
||||
* @throws InvalidAlgorithmParameterException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws CertPathValidatorException
|
||||
*/
|
||||
public static void validate(List<X509Certificate> chain, List<X509Certificate> trustedCerts) throws CertificateException, CertPathValidatorException {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class KeyStoreHelper {
|
|||
* <p>
|
||||
* It blocks until the initial update has been received from the Workload API.
|
||||
*
|
||||
* @param options an instance of {@link KeyStoreOptions}
|
||||
* @throws SocketEndpointAddressException is the socket endpoint address is not valid
|
||||
* @throws KeyStoreException is the entry cannot be stored in the KeyStore
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@ import static io.spiffe.provider.SpiffeProviderConstants.PROVIDER_NAME;
|
|||
* that handles an X.509-SVID Certificate to probe identity. It also registers a {@link javax.net.ssl.TrustManagerFactory}
|
||||
* for creating a {@link javax.net.ssl.TrustManager} for trust chain and SPIFFE ID validation.
|
||||
* <p>
|
||||
* To use this Provider, it is needed to add the following lines to the <tt>java.security</tt> file:
|
||||
* To use this Provider, it is needed to add the following lines to the java.security file:
|
||||
* <pre>
|
||||
* security.provider.<n>=SpiffeProvider
|
||||
* security.provider.n=SpiffeProvider
|
||||
* ssl.KeyManagerFactory.algorithm=Spiffe
|
||||
* ssl.TrustManagerFactory.algorithm=Spiffe
|
||||
* </pre>
|
||||
* <p>
|
||||
* Also, to configure the accepted SPIFFE IDs, add to the <tt>java.security</tt> the list of SPIFFE IDs
|
||||
* Also, to configure the accepted SPIFFE IDs, add to the java.security the list of SPIFFE IDs
|
||||
* separated by commas:
|
||||
* <pre>
|
||||
* ssl.spiffe.accept=spiffe://example.org/workload1, spiffe://example.org/workload2, spiffe://other-domain.org/workload
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ public class SpiffeTrustManagerFactory extends TrustManagerFactorySpi {
|
|||
* If the System property 'ssl.spiffe.acceptAll' is defined as 'true', the TrustManager is configure to accept
|
||||
* any SPIFFE ID presented by a peer.
|
||||
*
|
||||
* @param x509BundleSource a source of X.509 bundles
|
||||
* @return an instance of a {@link TrustManager} wrapped in an array. The actual type returned is {@link SpiffeTrustManager}
|
||||
*/
|
||||
public TrustManager[] engineGetTrustManagers(@NonNull BundleSource<X509Bundle> x509BundleSource) {
|
||||
|
|
@ -99,6 +100,7 @@ public class SpiffeTrustManagerFactory extends TrustManagerFactorySpi {
|
|||
* Creates a {@link TrustManager} initialized with a {@link BundleSource} to provide the X.509 bundles.
|
||||
* The TrustManager is configured to accept any SPIFFE ID.
|
||||
*
|
||||
* @param x509BundleSource a source of X.509 bundles
|
||||
* @return an instance of a {@link TrustManager} wrapped in an array. The actual type returned is {@link SpiffeTrustManager}
|
||||
*/
|
||||
public TrustManager[] engineGetTrustManagersAcceptAnySpiffeId(@NonNull BundleSource<X509Bundle> x509BundleSource) {
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ import io.spiffe.workloadapi.X509Source;
|
|||
* If the environment variable is not defined, it will throw an <code>IllegalStateException</code>.
|
||||
* If the X509Source cannot be initialized, it will throw a <code>RuntimeException</code>.
|
||||
* <p>
|
||||
*
|
||||
* @implNote This Singleton needed to be able to handle a single {@link X509Source} instance
|
||||
* This Singleton needed to be able to handle a single {@link X509Source} instance
|
||||
* to be used by the {@link SpiffeKeyManagerFactory} and {@link SpiffeTrustManagerFactory} to inject it
|
||||
* in the {@link SpiffeKeyManager} and {@link SpiffeTrustManager} instances.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue