Example usage for java.security.cert CertificateParsingException toString

List of usage examples for java.security.cert CertificateParsingException toString

Introduction

In this page you can find the example usage for java.security.cert CertificateParsingException toString.

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:com.vmware.o11n.plugin.crypto.model.CryptoCertificate.java

/**
 *
 * @return/*from   w  w  w. j  a v a2s .  c  o  m*/
 */
@VsoProperty(name = "subjectAlternativeNames", description = "A list of subject alternative names found in the certificate. Each will have a colon delimited prefix for the type of SAN found.  ex: \"dns:\"")
public String[] getSubjectAlternativeNames() {
    try {
        List<String> san = service.getSubjectAlternativeNames(this.cert);
        if (san != null && san.size() > 0) {
            return san.toArray(EMPTY_STRING_ARRAY);
        }
    } catch (CertificateParsingException e) {
        log.error(e.toString());
    }
    return EMPTY_STRING_ARRAY;
}