revert-70aa11f8
hasuniea 9 years ago
commit 6ae4bfe4e0

@ -320,18 +320,20 @@ public class CertificateGenerator {
Date validityBeginDate = commonUtil.getValidityStartDate(); Date validityBeginDate = commonUtil.getValidityStartDate();
Date validityEndDate = commonUtil.getValidityEndDate(); Date validityEndDate = commonUtil.getValidityEndDate();
X500Name certSubject = request.getSubject(); X500Name certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
Attribute attributes[] = request.getAttributes(); //X500Name certSubject = request.getSubject();
if (certSubject == null) { Attribute attributes[] = request.getAttributes();
certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
} else {
org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs();
if (rdn == null || rdn.length == 0) { // if (certSubject == null) {
certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL); // certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
} // } else {
} // org.bouncycastle.asn1.x500.RDN[] rdn = certSubject.getRDNs();
//
// if (rdn == null || rdn.length == 0) {
// certSubject = new X500Name(ConfigurationUtil.DEFAULT_PRINCIPAL);
// }
// }
X509v3CertificateBuilder certificateBuilder = new X509v3CertificateBuilder( X509v3CertificateBuilder certificateBuilder = new X509v3CertificateBuilder(
new X500Name(issueSubject), CommonUtil.generateSerialNumber(), new X500Name(issueSubject), CommonUtil.generateSerialNumber(),

@ -24,10 +24,14 @@ public interface FeatureManager {
boolean addFeature(Feature feature) throws DeviceManagementException; boolean addFeature(Feature feature) throws DeviceManagementException;
boolean addFeatures(List<Feature> features) throws DeviceManagementException;
Feature getFeature(String name) throws DeviceManagementException; Feature getFeature(String name) throws DeviceManagementException;
List<Feature> getFeatures() throws DeviceManagementException; List<Feature> getFeatures() throws DeviceManagementException;
boolean removeFeature(String name) throws DeviceManagementException; boolean removeFeature(String name) throws DeviceManagementException;
boolean addSupportedFeaturesToDB() throws DeviceManagementException;
} }

@ -2,7 +2,7 @@
/* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */ /* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */
CREATE TABLE DM_DEVICE_TYPE ( CREATE TABLE DM_DEVICE_TYPE (
ID INT identity NOT NULL, ID INT IDENTITY NOT NULL,
NAME VARCHAR(300) DEFAULT NULL, NAME VARCHAR(300) DEFAULT NULL,
PRIMARY KEY (ID) PRIMARY KEY (ID)
); );

@ -2,8 +2,8 @@
-- Table `DM_DEVICE_TYPE` -- Table `DM_DEVICE_TYPE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` ( CREATE TABLE IF NOT EXISTS `DM_DEVICE_TYPE` (
`ID` INT(11) NOT NULL , `ID` INT(11) NOT NULL AUTO_INCREMENT,
`NAME` VARCHAR(300) DEFAULT NULL , `NAME` VARCHAR(300) NOT NULL ,
PRIMARY KEY (`ID`) ) PRIMARY KEY (`ID`) )
ENGINE = InnoDB ENGINE = InnoDB
DEFAULT CHARACTER SET = latin1; DEFAULT CHARACTER SET = latin1;
@ -13,12 +13,12 @@ DEFAULT CHARACTER SET = latin1;
-- Table `DM_DEVICE` -- Table `DM_DEVICE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `DM_DEVICE` ( CREATE TABLE IF NOT EXISTS `DM_DEVICE` (
`ID` VARCHAR(20) NOT NULL , `ID` VARCHAR(20) NOT NULL AUTO_INCREMENT ,
`DESCRIPTION` TEXT DEFAULT NULL , `DESCRIPTION` TEXT DEFAULT NULL ,
`NAME` VARCHAR(100) DEFAULT NULL , `NAME` VARCHAR(100) NOT NULL ,
`DEVICE_TYPE_ID` INT(11) DEFAULT NULL , `DEVICE_TYPE_ID` INT(11) NOT NULL ,
`DEVICE_IDENTIFICATION` VARCHAR(300) DEFAULT NULL , `DEVICE_IDENTIFICATION` VARCHAR(300) NOT NULL ,
`TENANT_ID` INTEGER DEFAULT 0, `TENANT_ID` INTEGER NOT NULL,
PRIMARY KEY (`ID`) , PRIMARY KEY (`ID`) ,
INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) , INDEX `fk_DM_DEVICE_DM_DEVICE_TYPE2_idx` (`DEVICE_TYPE_ID` ASC) ,
CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2` CONSTRAINT `fk_DM_DEVICE_DM_DEVICE_TYPE2`

@ -2,7 +2,7 @@
/* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */ /* OBTAIN A LICENSE AT WWW.SQLINES.COM FOR FULL CONVERSION. THANK YOU. */
CREATE TABLE DM_DEVICE_TYPE ( CREATE TABLE DM_DEVICE_TYPE (
ID NUMBER(10) NOT NULL, ID NUMBER(10) NOT NULL,
NAME VARCHAR2(300) DEFAULT NULL, NAME VARCHAR2(300) DEFAULT NULL,
PRIMARY KEY (ID) PRIMARY KEY (ID)
); );

Loading…
Cancel
Save