Skip to content

Commit

Permalink
fixup! Addjust tests to deal with ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
simo5 committed Feb 24, 2025
1 parent feba984 commit 6a441ee
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ crt_selfsign() {
CERTSUBJ="/CN=$CN/"
SIGNKEY="pkcs11:object=$LABEL;token=$TOKENLABELURI;type=private"

OPENSSL_CMD='x509
-new -subj "${CERTSUBJ}" -days 365 -set_serial "${SERIAL}"
-extensions v3_ca -extfile "${OPENSSL_CONF}"
-out "${TMPPDIR}/${LABEL}.crt" -outform DER
-signkey "${SIGNKEY}"'
OPENSSL_CMD="x509
-new -subj \"${CERTSUBJ}\" -days 365 -set_serial \"${SERIAL}\"
-extensions v3_ca -extfile \"${OPENSSL_CONF}\"
-out \"${TMPPDIR}/${LABEL}.crt\" -outform DER
-signkey \"${SIGNKEY}\""

ossl "$OPENSSL_CMD" 2>&1
ossl "${OPENSSL_CMD}" 2>&1
ptool "${P11DEFARGS[@]}" --write-object "${TMPPDIR}/${LABEL}.crt" \
--type=cert --id="$KEYID" --label="$LABEL" 2>&1
}
Expand Down Expand Up @@ -161,17 +161,17 @@ ca_sign() {
SIGNKEY="pkcs11:object=$CACRTN;token=$TOKENLABELURI;type=private"
CERTPUBKEY="pkcs11:object=$LABEL;token=$TOKENLABELURI;type=public"

OPENSSL_CMD='x509
-new -subj "${CERTSUBJ}" -days 365 -set_serial "${SERIAL}"
-extensions v3_req -extfile "${OPENSSL_CONF}"
-out "${TMPPDIR}/${LABEL}.crt" -outform DER
-force_pubkey "${CERTPUBKEY}" -signkey "${SIGNKEY}"'
OPENSSL_CMD="x509
-new -subj \"${CERTSUBJ}\" -days 365 -set_serial \"${SERIAL}\"
-extensions v3_req -extfile \"${OPENSSL_CONF}\"
-out \"${TMPPDIR}/${LABEL}.crt\" -outform DER
-force_pubkey \"${CERTPUBKEY}\" -signkey \"${SIGNKEY}\""

if [ "$SIGOPT" = "PSS" ]; then
OPENSSL_CMD+=' -sigopt rsa_padding_mode:pss'
OPENSSL_CMD+=" -sigopt rsa_padding_mode:pss"
fi

ossl "$OPENSSL_CMD" 2>&1
ossl "${OPENSSL_CMD}" 2>&1
ptool "${P11DEFARGS[@]}" --write-object "${TMPPDIR}/${LABEL}.crt" --type=cert \
--id="$KEYID" --label="$LABEL" 2>&1
}
Expand Down

0 comments on commit 6a441ee

Please sign in to comment.