Class EnrollmentCoordinator.KeygenDelivery

java.lang.Object
zeroecho.pki.server.enrollment.EnrollmentCoordinator.KeygenDelivery
All Implemented Interfaces:
AutoCloseable
Enclosing class:
EnrollmentCoordinator

public static final class EnrollmentCoordinator.KeygenDelivery extends Object implements AutoCloseable
Bounded ciphertext borrower; the caller must close it on every HTTP outcome.
  • Method Details

    • length

      public long length()
      Returns exact encrypted body length.
      Returns:
      exact encrypted body length
    • openStream

      public InputStream openStream() throws IOException
      Opens the sole bounded body stream. Closing it also releases this lease.
      Returns:
      encrypted body, never a plaintext private key
      Throws:
      IOException - if the lease was released or already opened
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - if the owned file cannot be closed