* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.aaa.cert.api;
import java.security.KeyStore;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.mdsal.rev160321.key.stores.SslData;
/**
* ,TLSv1.2 protocols should be separated by ","
* @return the created SslData object
*/
- SslData addSslDataKeystores(@Nonnull String bundleName, @Nonnull String odlKeystoreName,
- @Nonnull String odlKeystorePwd, @Nonnull String odlKeystoreAlias, @Nonnull String odlKeystoreDname,
- @Nonnull String trustKeystoreName, @Nonnull String trustKeystorePwd, @Nonnull String[] cipherSuites,
- @Nonnull String tlsProtocols);
+ SslData addSslDataKeystores(@NonNull String bundleName, @NonNull String odlKeystoreName,
+ @NonNull String odlKeystorePwd, @NonNull String odlKeystoreAlias, @NonNull String odlKeystoreDname,
+ @NonNull String trustKeystoreName, @NonNull String trustKeystorePwd, @NonNull String[] cipherSuites,
+ @NonNull String tlsProtocols);
/**
* Add SslData object to Mdsal.
* protocols should be separated by ","
* @return the created SslData object
*/
- SslData addSslDataKeystores(@Nonnull String bundleName, @Nonnull String odlKeystoreName,
- @Nonnull String odlKeystorePwd, @Nonnull String odlKeystoreAlias, @Nonnull String odlKeystoreDname,
- @Nonnull String odlKeystoreKeyAlg, @Nonnull String odlKeystoreSignAlg, @Nonnull int odlKeystoreKeysize,
- @Nonnull int odlKeystoreValidity, @Nonnull String trustKeystoreName, @Nonnull String trustKeystorePwd,
- @Nonnull String[] cipherSuites, @Nonnull String tlsProtocols);
+ SslData addSslDataKeystores(@NonNull String bundleName, @NonNull String odlKeystoreName,
+ @NonNull String odlKeystorePwd, @NonNull String odlKeystoreAlias, @NonNull String odlKeystoreDname,
+ @NonNull String odlKeystoreKeyAlg, @NonNull String odlKeystoreSignAlg, int odlKeystoreKeysize,
+ int odlKeystoreValidity, @NonNull String trustKeystoreName, @NonNull String trustKeystorePwd,
+ @NonNull String[] cipherSuites, @NonNull String tlsProtocols);
/**
* add a ODL signed certificate that is signed by a CA based on a certificate request generated by
* @param certificate as string
* @return true for successful added certificate
*/
- boolean addODLStoreSignedCertificate(@Nonnull String bundleName, @Nonnull String alias,
- @Nonnull String certificate);
+ boolean addODLStoreSignedCertificate(@NonNull String bundleName, @NonNull String alias,
+ @NonNull String certificate);
/**
* Add a network node certificate to the trust keystore.
* @param certificate as string
* @return true for successful added certificate
*/
- boolean addTrustNodeCertificate(@Nonnull String bundleName, @Nonnull String alias, @Nonnull String certificate);
+ boolean addTrustNodeCertificate(@NonNull String bundleName, @NonNull String alias, @NonNull String certificate);
/**
* Export the ODL keystore and Trust keystore to a file under karaf ssl/ directory.
*
* @param bundleName name of the bundle that will use the keystores
*/
- void exportSslDataKeystores(@Nonnull String bundleName);
+ void exportSslDataKeystores(@NonNull String bundleName);
/**
* Generate a certificate request to be signed by a CA with default sign algorithm SHA1WithRSAEncryption.
* @param withTag boolean to add cert-req tag to the return string
* @return certificate request as string
*/
- String genODLKeyStoreCertificateReq(@Nonnull String bundleName, boolean withTag);
+ String genODLKeyStoreCertificateReq(@NonNull String bundleName, boolean withTag);
/**
* Get the ODL keystore certificate.
* @param withTag boolean to add cert tag to the return string
* @return certificate as string
*/
- @Nullable
- String getODLStoreCertificate(@Nonnull String bundleName, boolean withTag);
+ @Nullable String getODLStoreCertificate(@NonNull String bundleName, boolean withTag);
/**
* Get a Network node certificate from the Trust keystore.
* @param withTag boolean to add cert tag to the return string
* @return certificate as string
*/
- @Nullable
- String getTrustStoreCertificate(@Nonnull String bundleName, @Nonnull String alias, boolean withTag);
+ @Nullable String getTrustStoreCertificate(@NonNull String bundleName, @NonNull String alias, boolean withTag);
/**
* Get the SslData.
* @param bundleName name of the bundle that will use the keystores
* @return the SslData
*/
- SslData getSslData(@Nonnull String bundleName);
+ SslData getSslData(@NonNull String bundleName);
/**
* Get the ODL keystore object to be used by the SSLContext to establish the SSL connection.
* @param bundleName name of the bundle that will use the keystores
* @return ODL keystore
*/
- KeyStore getODLKeyStore(@Nonnull String bundleName);
+ KeyStore getODLKeyStore(@NonNull String bundleName);
/**
* Get the trust keystore object to be used by the SSLContext to establish the SSL connection.
* @param bundleName name of the bundle that will use the keystores
* @return Trust keystore
*/
- KeyStore getTrustKeyStore(@Nonnull String bundleName);
+ KeyStore getTrustKeyStore(@NonNull String bundleName);
/**
* Get array of cipher suites that will be used in to establish the SSL connection.
* @param bundleName name of the bundle that will use the keystores
* @return Cipher Suites
*/
- String[] getCipherSuites(@Nonnull String bundleName);
+ String[] getCipherSuites(@NonNull String bundleName);
/**
* Get list of the supported TLS protocols.
* @param bundleName of the required TLS protocols
* @return TLS protocols
*/
- String[] getTlsProtocols(@Nonnull String bundleName);
+ String[] getTlsProtocols(@NonNull String bundleName);
/**
* Create SslData based on pre-established keystores for ODL and network nodes.
* protocols should be separated by ","
* @return the created SslData object
*/
- SslData importSslDataKeystores(@Nonnull String bundleName, @Nonnull String odlKeystoreName,
- @Nonnull String odlKeystorePwd, @Nonnull String odlKeystoreAlias, @Nonnull KeyStore odlKeyStore,
- @Nonnull String trustKeystoreName, @Nonnull String trustKeystorePwd, @Nonnull KeyStore trustKeyStore,
- @Nonnull String[] cipherSuites, @Nonnull String tlsProtocols);
+ SslData importSslDataKeystores(@NonNull String bundleName, @NonNull String odlKeystoreName,
+ @NonNull String odlKeystorePwd, @NonNull String odlKeystoreAlias, @NonNull KeyStore odlKeyStore,
+ @NonNull String trustKeystoreName, @NonNull String trustKeystorePwd, @NonNull KeyStore trustKeyStore,
+ @NonNull String[] cipherSuites, @NonNull String tlsProtocols);
/**
* Delete the SslData from Mdsal.
* @param bundleName name of the bundle that will use the keystores
* @return true for succeed delete
*/
- boolean removeSslData(@Nonnull String bundleName);
+ boolean removeSslData(@NonNull String bundleName);
/**
* Update the SslData.
* @param sslData SSL Data
* @return the updated SslData object
*/
- SslData updateSslData(@Nonnull SslData sslData);
+ SslData updateSslData(@NonNull SslData sslData);
/**
* Initialize the Keystore data tree at Mdsal.
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.aaa.cert.api;
import java.security.KeyStore;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rev151126.aaa.cert.service.config.CtlKeystore;
import org.opendaylight.yang.gen.v1.urn.opendaylight.yang.aaa.cert.rev151126.aaa.cert.service.config.TrustKeystore;
* IAaaCertProvider defines the basic operation for certificates management.
*
* @author mserngawy
- *
*/
public interface IAaaCertProvider {
* @param certificate certificate @Nonnull String
* @return true at successful adding certificate
*/
- boolean addCertificateODLKeyStore(@Nonnull String storePasswd, @Nonnull String alias, @Nonnull String certificate);
+ boolean addCertificateODLKeyStore(@NonNull String storePasswd, @NonNull String alias, @NonNull String certificate);
/**
* Add certificate to ODL keystore, the certificate should be signed
* @param certificate certificate @Nonnull String
* @return true at successful adding certificate
*/
- boolean addCertificateODLKeyStore(@Nonnull String alias, @Nonnull String certificate);
+ boolean addCertificateODLKeyStore(@NonNull String alias, @NonNull String certificate);
/**
* Add certificate to Trust keystore.
* @param certificate certificate @Nonnull String
* @return true at successful adding certificate
*/
- boolean addCertificateTrustStore(@Nonnull String storePasswd, @Nonnull String alias, @Nonnull String certificate);
+ boolean addCertificateTrustStore(@NonNull String storePasswd, @NonNull String alias, @NonNull String certificate);
/**
* Add certificate to Trust keystore.
* @param certificate certificate @Nonnull String
* @return true if certificate was added successfully
*/
- boolean addCertificateTrustStore(@Nonnull String alias, @Nonnull String certificate);
+ boolean addCertificateTrustStore(@NonNull String alias, @NonNull String certificate);
/**
* Generate certificate request from the ODL keystore to be signed by a CA.
* @param withTag return the certificate Req string with tag if true
* @return the certificate request
*/
- @Nonnull String genODLKeyStoreCertificateReq(@Nonnull String storePasswd, boolean withTag);
+ @NonNull String genODLKeyStoreCertificateReq(@NonNull String storePasswd, boolean withTag);
/**
* Generate certificate request from the ODL keystore to be signed by a CA.
* @param withTag return the certificate Req string with tag if true
* @return the certificate request
*/
- @Nonnull String genODLKeyStoreCertificateReq(boolean withTag);
+ @NonNull String genODLKeyStoreCertificateReq(boolean withTag);
/**
* Get certificate from the Trust keystore.
* @param withTag return the certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getCertificateTrustStore(@Nonnull String storePasswd, @Nonnull String alias, boolean withTag);
+ @NonNull String getCertificateTrustStore(@NonNull String storePasswd, @NonNull String alias, boolean withTag);
/**
* Get certificate from the Trust keystore.
* @param withTag return certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getCertificateTrustStore(@Nonnull String alias, boolean withTag);
+ @NonNull String getCertificateTrustStore(@NonNull String alias, boolean withTag);
/**
* Get ODL keystore certificate.
* @param withTag return certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getODLKeyStoreCertificate(@Nonnull String storePasswd, boolean withTag);
+ @NonNull String getODLKeyStoreCertificate(@NonNull String storePasswd, boolean withTag);
/**
* Get ODL keystore certificate.
* @param withTag return certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getODLKeyStoreCertificate(boolean withTag);
+ @NonNull String getODLKeyStoreCertificate(boolean withTag);
/**
* Get ODL Keystore as java keystore object.
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.aaa.cert.api;
import java.security.KeyStore;
-import javax.annotation.Nonnull;
import javax.net.ssl.SSLContext;
+import org.eclipse.jdt.annotation.NonNull;
/**
* ICertifcateManager defines the basic functions that are consumed by other bundles to establish the SSLContext.
* @param withTag return the certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getCertificateTrustStore(@Nonnull String storePasswd, @Nonnull String alias, boolean withTag);
+ @NonNull String getCertificateTrustStore(@NonNull String storePasswd, @NonNull String alias, boolean withTag);
/**
* Get ODL keystore certificate.
* @param withTag return certificate string with tag if true
* @return the certificate
*/
- @Nonnull String getODLKeyStoreCertificate(@Nonnull String storePasswd, boolean withTag);
+ @NonNull String getODLKeyStoreCertificate(@NonNull String storePasswd, boolean withTag);
/**
* Generate certificate request from the ODL keystore to be signed by a CA.
* @param withTag return the certificate Req string with tag if true
* @return the certificate request
*/
- @Nonnull String genODLKeyStoreCertificateReq(@Nonnull String storePasswd, boolean withTag);
+ @NonNull String genODLKeyStoreCertificateReq(@NonNull String storePasswd, boolean withTag);
/**
* Get the SSL Context that will be used to establish the connection.
* protocols should be separated by ","
* @return true if succeed
*/
- boolean importSslDataKeystores(@Nonnull String odlKeystoreName, @Nonnull String odlKeystorePwd,
- @Nonnull String odlKeystoreAlias, @Nonnull String trustKeystoreName,
- @Nonnull String trustKeystorePwd, @Nonnull String[] cipherSuites,
- @Nonnull String tlsProtocols);
+ boolean importSslDataKeystores(@NonNull String odlKeystoreName, @NonNull String odlKeystorePwd,
+ @NonNull String odlKeystoreAlias, @NonNull String trustKeystoreName,
+ @NonNull String trustKeystorePwd, @NonNull String[] cipherSuites,
+ @NonNull String tlsProtocols);
/**
* Export the ODL keystore and Trust keystore to keystore files under configuration/ssl/ directory.