forked from opendaylight/aaa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding command-line and certificate functionalities
Change-Id: I0d5ffe7d004146fdcc92b3cf06cf45762b99cbd2 Signed-off-by: Mohamed El-Serngawy <[email protected]>
- Loading branch information
1 parent
9797914
commit 7d9abdc
Showing
33 changed files
with
2,344 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2015 Inocybe Technology. All rights reserved. | ||
This program and the accompanying materials are made available under the | ||
terms of the Eclipse Public License v1.0 which accompanies this distribution, | ||
and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<parent> | ||
<groupId>org.opendaylight.aaa</groupId> | ||
<artifactId>aaa-parent</artifactId> | ||
<version>0.4.0-SNAPSHOT</version> | ||
<relativePath>../parent/</relativePath> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>aaa-cert</artifactId> | ||
<packaging>bundle</packaging> | ||
|
||
<properties> | ||
<openflowplugin.version>0.3.0-SNAPSHOT</openflowplugin.version> | ||
<openflow.protocol.spi.version>0.8.0-SNAPSHOT</openflow.protocol.spi.version> | ||
<powermock.version>1.5.2</powermock.version> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.opendaylight.controller</groupId> | ||
<artifactId>sal-binding-config</artifactId> | ||
</dependency> | ||
|
||
<!-- Bouncy Castle dependency --> | ||
<dependency> | ||
<groupId>org.bouncycastle</groupId> | ||
<artifactId>bcprov-jdk15on</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
</dependency> | ||
|
||
<!-- openflow dependency --> | ||
<dependency> | ||
<groupId>org.opendaylight.openflowplugin</groupId> | ||
<artifactId>features-openflowplugin</artifactId> | ||
<classifier>features</classifier> | ||
<version>${openflowplugin.version}</version> | ||
<type>xml</type> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.opendaylight.openflowjava</groupId> | ||
<artifactId>openflow-protocol-spi</artifactId> | ||
<version>${openflow.protocol.spi.version}</version> | ||
</dependency> | ||
|
||
<!-- Testing Dependencies --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-core</artifactId> | ||
<version>${powermock.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-module-junit4</artifactId> | ||
<version>${powermock.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-api-mockito</artifactId> | ||
<version>${powermock.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-api-support</artifactId> | ||
<version>${powermock.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<extensions>true</extensions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-artifacts</id> | ||
<goals> | ||
<goal>attach-artifact</goal> | ||
</goals> | ||
<phase>package</phase> | ||
<configuration> | ||
<artifacts> | ||
<artifact> | ||
<file>${project.build.directory}/classes/initial/08-aaa-cert-config.xml</file> | ||
<type>xml</type> | ||
<classifier>config</classifier> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.opendaylight.yangtools</groupId> | ||
<artifactId>yang-maven-plugin</artifactId> | ||
<version>${yangtools.version}</version> | ||
<executions> | ||
<execution> | ||
<id>config</id> | ||
<goals> | ||
<goal>generate-sources</goal> | ||
</goals> | ||
<configuration> | ||
<codeGenerators> | ||
<generator> | ||
<codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass> | ||
<outputBaseDir>${jmxGeneratorPath}</outputBaseDir> | ||
<additionalConfiguration> | ||
<namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1> | ||
</additionalConfiguration> | ||
</generator> | ||
<generator> | ||
<codeGeneratorClass>org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass> | ||
<outputBaseDir>${salGeneratorPath}</outputBaseDir> | ||
</generator> | ||
</codeGenerators> | ||
<inspectDependencies>true</inspectDependencies> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.opendaylight.controller</groupId> | ||
<artifactId>yang-jmx-generator-plugin</artifactId> | ||
<version>${config.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.opendaylight.mdsal</groupId> | ||
<artifactId>maven-sal-api-gen-plugin</artifactId> | ||
<version>${mdsal.model.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
38 changes: 38 additions & 0 deletions
38
aaa-cert/src/main/java/org/opendaylight/aaa/cert/api/IAaaCertProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2015 Inocybe Technologies. and others. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* 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; | ||
|
||
/** | ||
* | ||
* @author mserngawy | ||
* | ||
* IAaaCertProvider define the basic operation for certificates management | ||
*/ | ||
public interface IAaaCertProvider extends java.lang.AutoCloseable { | ||
|
||
boolean addCertificateODLKeyStore(String storePasswd, String alias, String certificate); | ||
|
||
boolean addCertificateTrustStore(String storePasswd, String alias, String certificate); | ||
|
||
String createODLKeyStore(String keyStore, String storePasswd, String alias, String dName, int validity); | ||
|
||
String createTrustKeyStore(String keyStore, String storePasswd, String alias); | ||
|
||
String genODLKeyStorCertificateReq(String storePasswd, String alias); | ||
|
||
String getCertificateTrustStore(String storePasswd, String aliase); | ||
|
||
String getODLKeyStorCertificate(String storePasswd, String alias); | ||
|
||
KeyStore getODLKeyStore(); | ||
|
||
KeyStore getTrustKeyStore(); | ||
} |
Oops, something went wrong.