diff options
author | René Korthaus <[email protected]> | 2017-07-04 22:12:07 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2017-07-04 22:12:07 +0200 |
commit | 4f2680a5c9a8b47c36e0f65bd5117a1837474279 (patch) | |
tree | df60771d8c95b0cba29c9b355ede5b09d607b1b1 /doc/manual | |
parent | 38fe6d3ab3e8a4be2becd5fd0b8c7bb4a8f1e192 (diff) |
Remove "pkcs11" provider paramater for pk ops in handbook and tests
We have special key types for PKCS#11 public and private keys.
When using the PK ops classes, passing the "pkcs11" provider
parameter is not necessary, as the PK ops is internally chosen
by the PKCS#11 key class, in contrast to other providers such
as openssl, which don't have special key classes. Updates the
handbook code examples and the tests.
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/pkcs11.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/manual/pkcs11.rst b/doc/manual/pkcs11.rst index 8e78b8797..a95e126bf 100644 --- a/doc/manual/pkcs11.rst +++ b/doc/manual/pkcs11.rst @@ -750,22 +750,22 @@ Code example: /************ RSA encrypt *************/ Botan::secure_vector<uint8_t> plaintext = { 0x00, 0x01, 0x02, 0x03 }; - Botan::PK_Encryptor_EME encryptor( rsa_keypair.first, rng, "Raw", "pkcs11" ); + Botan::PK_Encryptor_EME encryptor( rsa_keypair.first, rng, "Raw" ); auto ciphertext = encryptor.encrypt( plaintext, rng ); /************ RSA decrypt *************/ - Botan::PK_Decryptor_EME decryptor( rsa_keypair.second, rng, "Raw", "pkcs11" ); + Botan::PK_Decryptor_EME decryptor( rsa_keypair.second, rng, "Raw" ); plaintext = decryptor.decrypt( ciphertext ); /************ RSA sign *************/ - Botan::PK_Signer signer( rsa_keypair.second, rng, "EMSA4(SHA-256)", Botan::IEEE_1363, "pkcs11" ); + Botan::PK_Signer signer( rsa_keypair.second, rng, "EMSA4(SHA-256)", Botan::IEEE_1363 ); auto signature = signer.sign_message( plaintext, rng ); /************ RSA verify *************/ - Botan::PK_Verifier verifier( rsa_keypair.first, "EMSA4(SHA-256)", Botan::IEEE_1363, "pkcs11" ); + Botan::PK_Verifier verifier( rsa_keypair.first, "EMSA4(SHA-256)", Botan::IEEE_1363 ); auto ok = verifier.verify_message( plaintext, signature ); ECDSA |