Package br.net.woodstock.rockframework.security.cert

Examples of br.net.woodstock.rockframework.security.cert.CertificateException


        return Collections.toArray(errors, ValidationError.class);
      }

      return new ValidationError[0];
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here


  protected void init() {
    try {
      this.keyUsage = this.certificate.getKeyUsage();
      this.extendedKeyUsage = this.certificate.getExtendedKeyUsage();
    } catch (CertificateParsingException e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

    try {
      CertificateFactory certFactory = CertificateFactory.getInstance(this.type.getType());
      Certificate certificate = certFactory.generateCertificate(inputStream);
      return new Certificate[] { certificate };
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

        return new ValidationError[] { new ValidationError(CRLCertificateValidator.VALIDATOR_NAME, "Certificate revoked") };
      }

      return new ValidationError[0];
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

    } catch (CertPathBuilderException e) {
      RockFrameworkLogger.getLogger().info(e.getMessage(), e);
      RockFrameworkLogger.getLogger().info("Validation error: " + e.getMessage());
      return new ValidationError[] { new ValidationError(PKIXCertificateValidator.VALIDATOR_NAME, "Invalid certificate infrastructure") };
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

    Assert.notEmpty(chain, "chain");
    Assert.notNull(outputStream, "outputStream");
    try {
      outputStream.write(chain[0].getEncoded());
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

        return new ValidationError[] { new ValidationError(SelfSignedCertificateValidator.VALIDATOR_NAME, "Certificate self signed") };
      }

      return new ValidationError[0];
    } catch (GeneralSecurityException e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

      PrivateKeyHolder privateKeyHolder = new PrivateKeyHolder(privateKey, new Certificate[] { certificate });

      return privateKeyHolder;
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

      if (resp.getStatus() != OCSPResponseStatus.SUCCESSFUL) {
        return new ValidationError[] { new ValidationError(OCSPCertificateValidator.VALIDATOR_NAME, "Certificate not valid") };
      }
      return new ValidationError[0];
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

        return new ValidationError[] { new ValidationError(CRLCertificateValidator.VALIDATOR_NAME, "Certificate revoked") };
      }

      return new ValidationError[0];
    } catch (Exception e) {
      throw new CertificateException(e);
    }
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.security.cert.CertificateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.