fm.liveswitch.DtlsCertificate Class Reference

A certificate to be used for DTLS communication. More...

Public Member Functions

 DtlsCertificate ()
 

Static Public Member Functions

static fm.liveswitch.DtlsCertificate generateCertificate ()
 Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName)
 Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName, java.util.Date expirationDate)
 Generates a certificate with the given issuer name, subject name, and expiration date. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName, java.util.Date expirationDate, fm.liveswitch.AsymmetricKey key)
 Generates a certificate with the given issuer name, subject name, expiration date, and asymmetric key. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName, java.util.Date expirationDate, fm.liveswitch.AsymmetricKeyType keyType)
 Generates a certificate with the given issuer name, subject name, expiration date, and asymmetric key. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName, fm.liveswitch.AsymmetricKey key)
 Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String issuerName, String subjectName, fm.liveswitch.AsymmetricKeyType keyType)
 Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (fm.liveswitch.AsymmetricKey key)
 Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (fm.liveswitch.AsymmetricKeyType keyType)
 Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String name)
 Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String name, fm.liveswitch.AsymmetricKey key)
 Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificate (String name, fm.liveswitch.AsymmetricKeyType keyType)
 Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificateFromOldCertificate (fm.liveswitch.DtlsCertificate oldCertificate)
 Generates a certificate using the issuer/subject name from an old certificate and an expiration date of 10 days from now. More...
 
static fm.liveswitch.DtlsCertificate generateCertificateFromOldCertificate (fm.liveswitch.DtlsCertificate oldCertificate, java.util.Date expirationDate)
 Generates a certificate using the issuer/subject name from an old certificate and the given expiration date. More...
 
static fm.liveswitch.AsymmetricKeyType getDefaultKeyType ()
 Gets the default asymmetric key type (ECDSA). More...
 
static fm.liveswitch.DtlsCertificate parseBytes (byte[] bytes)
 Deserializes a certificate from binary. More...
 
static void setDefaultKeyType (fm.liveswitch.AsymmetricKeyType value)
 Sets the default asymmetric key type (ECDSA). More...
 

Protected Member Functions

fm.liveswitch.DtlsCertificate createCertificate ()
 Creates the certificate. More...
 
fm.liveswitch.DtlsFingerprint createFingerprint (String algorithm, String value)
 Creates a fingerprint. More...
 

Detailed Description

A certificate to be used for DTLS communication.

Constructor & Destructor Documentation

◆ DtlsCertificate()

fm.liveswitch.DtlsCertificate.DtlsCertificate ( )

Member Function Documentation

◆ createCertificate()

fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.createCertificate ( )
protected

Creates the certificate.

◆ createFingerprint()

fm.liveswitch.DtlsFingerprint fm.liveswitch.DtlsCertificate.createFingerprint ( String  algorithm,
String  value 
)
protected

Creates a fingerprint.

Parameters
algorithmThe algorithm.
valueThe value.

◆ generateCertificate() [1/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( )
static

Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now.

◆ generateCertificate() [2/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( fm.liveswitch.AsymmetricKey  key)
static

Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now.

Parameters
keyThe asymmetric key (with public and private details).

◆ generateCertificate() [3/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( fm.liveswitch.AsymmetricKeyType  keyType)
static

Generates a certificate with a default issuer/subject name and an expiration date of 10 days from now.

Parameters
keyTypeThe asymmetric key type.

◆ generateCertificate() [4/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName 
)
static

Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.

◆ generateCertificate() [5/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName,
fm.liveswitch.AsymmetricKey  key 
)
static

Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.
keyThe asymmetric key (with public and private details).

◆ generateCertificate() [6/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName,
fm.liveswitch.AsymmetricKeyType  keyType 
)
static

Generates a certificate with the given issuer name, subject name, and an expiration date of 10 days from now.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.
keyTypeThe asymmetric key type.

◆ generateCertificate() [7/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName,
java.util.Date  expirationDate 
)
static

Generates a certificate with the given issuer name, subject name, and expiration date.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.
expirationDateThe expiration date.

◆ generateCertificate() [8/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName,
java.util.Date  expirationDate,
fm.liveswitch.AsymmetricKey  key 
)
static

Generates a certificate with the given issuer name, subject name, expiration date, and asymmetric key.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.
expirationDateThe expiration date.
keyThe asymmetric key (with public and private details).

◆ generateCertificate() [9/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  issuerName,
String  subjectName,
java.util.Date  expirationDate,
fm.liveswitch.AsymmetricKeyType  keyType 
)
static

Generates a certificate with the given issuer name, subject name, expiration date, and asymmetric key.

Parameters
issuerNameThe name of the issuer.
subjectNameThe name of the subject.
expirationDateThe expiration date.
keyTypeThe asymmetric key type.

◆ generateCertificate() [10/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  name)
static

Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now.

Parameters
nameThe name of the issuer/subject.

◆ generateCertificate() [11/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  name,
fm.liveswitch.AsymmetricKey  key 
)
static

Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now.

Parameters
nameThe name of the issuer/subject.
keyThe asymmetric key (with public and private details).

◆ generateCertificate() [12/12]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificate ( String  name,
fm.liveswitch.AsymmetricKeyType  keyType 
)
static

Generates a certificate with the given issuer/subject name and an expiration date of 10 days from now.

Parameters
nameThe name of the issuer/subject.
keyTypeThe asymmetric key type.

◆ generateCertificateFromOldCertificate() [1/2]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificateFromOldCertificate ( fm.liveswitch.DtlsCertificate  oldCertificate)
static

Generates a certificate using the issuer/subject name from an old certificate and an expiration date of 10 days from now.

Parameters
oldCertificateThe old certificate.

◆ generateCertificateFromOldCertificate() [2/2]

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.generateCertificateFromOldCertificate ( fm.liveswitch.DtlsCertificate  oldCertificate,
java.util.Date  expirationDate 
)
static

Generates a certificate using the issuer/subject name from an old certificate and the given expiration date.

Parameters
oldCertificateThe old certificate.
expirationDateThe expiration date.

◆ getDefaultKeyType()

static fm.liveswitch.AsymmetricKeyType fm.liveswitch.DtlsCertificate.getDefaultKeyType ( )
static

Gets the default asymmetric key type (ECDSA).

◆ parseBytes()

static fm.liveswitch.DtlsCertificate fm.liveswitch.DtlsCertificate.parseBytes ( byte[]  bytes)
static

Deserializes a certificate from binary.

Parameters
bytesThe bytes.

◆ setDefaultKeyType()

static void fm.liveswitch.DtlsCertificate.setDefaultKeyType ( fm.liveswitch.AsymmetricKeyType  value)
static

Sets the default asymmetric key type (ECDSA).