Package org.jscep.transaction

Examples of org.jscep.transaction.OperationFailureException


    return Collections.emptyList();
      }
      String password = getPassword(csr);
      if (!password.equals("password")) {
    LOGGER.debug("Invalid password");
    throw new OperationFailureException(FailInfo.badRequest);
      }
      PublicKey pubKey = CertificationRequestUtils.getPublicKey(csr);
      X509Certificate issued = generateCertificate(pubKey, subject, name,
        getSerial());

      LOGGER.debug("Issuing {}", issued);
      CACHE.put(
        new IssuerAndSerialNumber(name, issued.getSerialNumber()),
        issued);

      return Collections.singletonList(issued);
  } catch (Exception e) {
      LOGGER.debug("Error in enrollment", e);
      throw new OperationFailureException(FailInfo.badRequest);
  }
    }
View Full Code Here


  LOGGER.debug("Searching cache for {}, {}", iasn.getName(),
    iasn.getSerialNumber());
  if (CACHE.containsKey(iasn)) {
      return Collections.singletonList(CACHE.get(iasn));
  }
  throw new OperationFailureException(FailInfo.badCertId);
    }
View Full Code Here

  }
  try {
      return Collections.singletonList(generateCertificate(pubKey,
        subject, issuer, getSerial()));
  } catch (Exception e) {
      throw new OperationFailureException(FailInfo.badCertId);
  }
    }
View Full Code Here

        throw new RuntimeException(e);
      }
    } else if (state == State.CERT_REQ_PENDING) {
      throw new IllegalStateException();
    } else {
      throw new OperationFailureException(t.getFailInfo());
    }
  }
View Full Code Here

    if (state == State.CERT_ISSUED) {
      return t.getCertStore();
    } else if (state == State.CERT_REQ_PENDING) {
      throw new IllegalStateException();
    } else {
      throw new OperationFailureException(t.getFailInfo());
    }
  }
View Full Code Here

TOP

Related Classes of org.jscep.transaction.OperationFailureException

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.