Class HeaderSigner

java.lang.Object
edu.suffolk.litlab.efspserver.HeaderSigner

public class HeaderSigner extends Object
  • Constructor Details

    • HeaderSigner

      public HeaderSigner(String pathToKeystore, String x509Password)
      The string password to the x509 certificate. This password is given by Tyler, and will also unlock the .pfx file.
      Parameters:
      pathToKeystore - The path to the '.pfx' file that contains Tyler provided X509 certificate
      x509Password - the password to the password for that x509 password
  • Method Details

    • signedBase64

      public Optional<String> signedBase64(String content)
      Signs the provided @param content with the X509 certificate, returning the signed string as a base64 encoded string.
      Parameters:
      content - The string to be signed
      Returns:
      The base64 encoded string, empty if something went wrong with the cert
    • signedCurrentTime

      public Optional<String> signedCurrentTime()
      Gets the current timestamp, signs it with an x.509 cert, and returns the signature
      Returns:
      signed bytes of the timestamp string that has been base 64 encoded