Skip to content

Commit

Permalink
Changing the expiration date to work with Linux and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
silverdaz committed Jul 11, 2024
1 parent 8b1102c commit 94e630d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/expiration.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function teardown() {

# Bob encrypts the testfile for Alice
export C4GH_PASSPHRASE=${BOB_PASSPHRASE}
EXP_DATE=$(date -Iseconds -jf %s $(( $(date +%s) - 86400 * 2 )))
EXP_DATE=$(python -c 'import time,datetime; print(datetime.datetime.fromtimestamp(time.time() - 86400 * 2).isoformat())')
crypt4gh encrypt --recipient_pk ${ALICE_PUBKEY} --expiration "${EXP_DATE}" < $TESTFILE > $TESTFILES/message.c4gh

# Alice decrypts it
Expand All @@ -38,7 +38,7 @@ function teardown() {

# Bob encrypts the testfile for Alice
export C4GH_PASSPHRASE=${BOB_PASSPHRASE}
EXP_DATE=$(date -Iseconds -jf %s $(( $(date +%s) + 86400 * 2 )))
EXP_DATE=$(python -c 'import time,datetime; print(datetime.datetime.fromtimestamp(time.time() + 86400 * 2).isoformat())')
crypt4gh encrypt --sk ${BOB_SECKEY} --recipient_pk ${ALICE_PUBKEY} --expiration "${EXP_DATE}" < $TESTFILE > $TESTFILES/message.c4gh

# Alice decrypts it
Expand Down

0 comments on commit 94e630d

Please sign in to comment.