Page History
...
Managing the Private Key and Certificate
Asymetric Asymmetric encryption makes use of a Private Key and Certificate/Public Key that can be created in a number of ways:
- Users can create a Certificate Signing Request (CSR) and ask their Certificate Authority (CA) to sign the CSR and to receive an X.509 certificate. The Private Key or X.509 Certificate allow to derive the Public Key.
- User can create a selfCA-signed X.509 Certificate, see JS7 - How to create X.509 SSL TLS CertificatesEncryption Keys.
- Users can create a Private Key and Certificate as explained in the next chapter.
...
Code Block | ||||
---|---|---|---|---|
| ||||
call .\bin\js7_encrypt.cmd "--cert=agent.crt" "--in=secret" @echo result=%JS7_ENCRYPT_VALUE% >> %JS7_RETURN_VALUESVALUES% @rem encrypts the given secret using an Agent's X.509 certificate @rem consider that for Windows Shell all arguments have to be quoted @rem output is stored to the "result" variable (key/value pair) that is made available for later jobs in the workflow |
...
Code Block | ||||
---|---|---|---|---|
| ||||
@rem call .\bin\js7_encrypt.cmd "--cert=agent.crt" "--infile=%TEMP%\secret.txt" "--outfile=%TEMP%\secret.txt.encrypted" call .\bin\js7_decrypt.cmd ^ "--key=agent.key" ^ "--in=%JS7_ENCRYPT_VALUE%" ^ "--infile=%TEMP%\secret.txt.encrypted" ^ "--outfile=%TEMP%\secret.txt.decrypted" type %TEMP%\secret.txt.decrypted @rem decrypts the given encrypted file using an Agent's private key @rem the JS7_ENCRYPT_VALUE environment variable is returned in the encryption step and holds the encrypted symmetric key, initialization vector and path to the encrypted file @rem consider that for Windows Shell all arguments have to be quoted @rem output includes the path to the decrypted file that is provided from the JS7_DECRYPT_FILE environment variable |
...
Resources
Overview
Content Tools