Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set keylime_port_t label for random ports use in tests #437

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require:
- openssl
- nmap-ncat
- python3-toml
- policycoreutils-python-utils
recommend:
- keylime
duration: 15m
Expand Down
5 changes: 5 additions & 0 deletions functional/basic-attestation-with-custom-certificates/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ rlJournalStart
rlRun 'rlImport "certgen/certgen"' || rlDie "cannot import openssl/certgen library"
rlAssertRpm keylime

#seting keylime_port_t label for ssl port
if rlIsRHEL '>=9.3' || rlIsFedora '>=38' || rlIsCentOS '>=9';then
rlRun "semanage port -a -t keylime_port_t -p tcp $SSL_SERVER_PORT"
fi

# generate TLS certificates for all
# we are going to use 4 certificates
# verifier = webserver cert used for the verifier server
Expand Down
1 change: 1 addition & 0 deletions functional/keylime-non-default-ports/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require:
- yum
- tpm2-tools
- python3-toml
- policycoreutils-python-utils
recommend:
- keylime
duration: 5m
Expand Down
10 changes: 10 additions & 0 deletions functional/keylime-non-default-ports/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ rlJournalStart
rlRun "limeInstallIMAConfig"
rlRun "limeStartIMAEmulator"
fi

#seting keylime_port_t label for non default ports
if rlIsRHEL '>=9.3' || rlIsFedora '>=38' || rlIsCentOS '>=9';then
rlRun "semanage port -a -t keylime_port_t -p tcp 19002"
rlRun "semanage port -a -t keylime_port_t -p tcp 18890"
rlRun "semanage port -a -t keylime_port_t -p tcp 18992"
rlRun "semanage port -a -t keylime_port_t -p tcp 18891"
rlRun "semanage port -a -t keylime_port_t -p tcp 18881"
fi

sleep 5
#set non default ports
#default port 9002
Expand Down