📄 crypt0002
字号:
#!/bin/bash## This test checks various aspects of RSA decryption## It needs a card with a private key+certificate pair at ID 45## Run this from the regression test directory.. functionsmsg <<EOF:::::: Testing on-card decryption facilities:::EOFo=$p15temp/plaintexte=$p15temp/encryptedd=$p15temp/decryptedp=$p15temp/key.pemp15_init --no-so-pinp15_set_pin -a 01p15_gen_key rsa/1024 --id 45 --key-usage decrypt -a 01msg "Extracting public key"run_check_status $p15tool --read-public-key 45 -o $pmsg "Encrypting message (pkcs1 padding)"echo lalla > $orun_check_status openssl rsautl -pubin -inkey $p -encrypt -in $o -out $ep15_crypt -c --pkcs1 -i $e -o $dcmp $o $d || fail "Decrypted file does not match plain text file"successp15_erase --secret @01=0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -