mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
refactoring comments
This commit is contained in:
parent
d4403c6d87
commit
b5a6280c8d
@ -16,7 +16,6 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.wso2.carbon.certificate.mgt.core.config;
|
package org.wso2.carbon.certificate.mgt.core.config;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.wso2.carbon.certificate.mgt.core.config;
|
package org.wso2.carbon.certificate.mgt.core.config;
|
||||||
|
|
||||||
import org.wso2.carbon.certificate.mgt.core.config.datasource.DataSourceConfig;
|
import org.wso2.carbon.certificate.mgt.core.config.datasource.DataSourceConfig;
|
||||||
|
|||||||
@ -38,9 +38,3 @@ public class DataSourceConfig {
|
|||||||
this.jndiLookupDefinition = jndiLookupDefinition;
|
this.jndiLookupDefinition = jndiLookupDefinition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
|
|
||||||
// ID INTEGER auto_increment NOT NULL,
|
|
||||||
// SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
|
|
||||||
// CERTIFICATE BLOB DEFAULT NULL,
|
|
||||||
// PRIMARY KEY (ID)
|
|
||||||
// );
|
|
||||||
|
|||||||
@ -29,8 +29,9 @@ public interface CertificateDAO {
|
|||||||
/**
|
/**
|
||||||
* This can be used to store a certificate in the database, where it will be stored against the serial number
|
* This can be used to store a certificate in the database, where it will be stored against the serial number
|
||||||
* of the certificate.
|
* of the certificate.
|
||||||
* @param byteArrayInputStream Holds the certificate.
|
*
|
||||||
* @param serialNumber Serial number of the certificate.
|
* @param byteArrayInputStream Holds the certificate.
|
||||||
|
* @param serialNumber Serial number of the certificate.
|
||||||
* @throws CertificateManagementDAOException
|
* @throws CertificateManagementDAOException
|
||||||
*/
|
*/
|
||||||
void addCertificate(ByteArrayInputStream byteArrayInputStream, String serialNumber
|
void addCertificate(ByteArrayInputStream byteArrayInputStream, String serialNumber
|
||||||
@ -38,8 +39,9 @@ public interface CertificateDAO {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Usage is to obtain a certificate stored in the database by providing the serial number.
|
* Usage is to obtain a certificate stored in the database by providing the serial number.
|
||||||
* @param serialNumber Serial number of the certificate.
|
*
|
||||||
* @return representation of the certificate.
|
* @param serialNumber Serial number of the certificate.
|
||||||
|
* @return representation of the certificate.
|
||||||
* @throws CertificateManagementDAOException
|
* @throws CertificateManagementDAOException
|
||||||
*/
|
*/
|
||||||
byte[] retrieveCertificate(String serialNumber
|
byte[] retrieveCertificate(String serialNumber
|
||||||
|
|||||||
@ -16,7 +16,6 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
package org.wso2.carbon.certificate.mgt.core.dao;
|
package org.wso2.carbon.certificate.mgt.core.dao;
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
|
|||||||
@ -44,7 +44,7 @@ public interface CertificateManagementService {
|
|||||||
byte[] getPKIMessageSCEP(InputStream inputStream) throws KeystoreException;
|
byte[] getPKIMessageSCEP(InputStream inputStream) throws KeystoreException;
|
||||||
|
|
||||||
X509Certificate generateCertificateFromCSR(PrivateKey privateKey, PKCS10CertificationRequest request,
|
X509Certificate generateCertificateFromCSR(PrivateKey privateKey, PKCS10CertificationRequest request,
|
||||||
String issueSubject) throws KeystoreException;
|
String issueSubject) throws KeystoreException;
|
||||||
|
|
||||||
Certificate getCertificateByAlias(String alias) throws KeystoreException;
|
Certificate getCertificateByAlias(String alias) throws KeystoreException;
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,8 @@ public class CertificateManagementServiceImpl implements CertificateManagementSe
|
|||||||
private static KeyStoreReader keyStoreReader;
|
private static KeyStoreReader keyStoreReader;
|
||||||
private static CertificateGenerator certificateGenerator;
|
private static CertificateGenerator certificateGenerator;
|
||||||
|
|
||||||
private CertificateManagementServiceImpl() {}
|
private CertificateManagementServiceImpl() {
|
||||||
|
}
|
||||||
|
|
||||||
public static CertificateManagementServiceImpl getInstance() {
|
public static CertificateManagementServiceImpl getInstance() {
|
||||||
|
|
||||||
@ -80,8 +81,8 @@ public class CertificateManagementServiceImpl implements CertificateManagementSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
public X509Certificate generateCertificateFromCSR(PrivateKey privateKey,
|
public X509Certificate generateCertificateFromCSR(PrivateKey privateKey,
|
||||||
PKCS10CertificationRequest request,
|
PKCS10CertificationRequest request,
|
||||||
String issueSubject) throws KeystoreException {
|
String issueSubject) throws KeystoreException {
|
||||||
return certificateGenerator.generateCertificateFromCSR(privateKey, request, issueSubject);
|
return certificateGenerator.generateCertificateFromCSR(privateKey, request, issueSubject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user