aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/pkcs11
Commit message (Collapse)AuthorAgeFilesLines
* Merge some of the P11 type headers (Slot/Module/Session) into p11_types.hJack Lloyd2020-11-0413-225/+234
| | | | Also forward declare the DLL wrapper class rather than including it
* Merge some of the ASN.1 headersJack Lloyd2020-10-311-1/+1
| | | | | Deprecate asn1_str.h asn1_time.h asn1_oid.h and alg_id.h with all contents moved to existing asn1_obj.h
* Add missing overloads to PKCS11_ECDSA_PrivateKeyRené Korthaus2020-03-041-0/+5
| | | | | | | | Since we don't derive from ECDSA_PrivateKey, message_parts() and message_part_size() need to be implemented additionally here. Fixes generating PKCS#11 ECDSA signatures as a DER sequence, which is required by strongswan, for example.
* Extend PKCS#11 RSA paddingsDaniel Neus2019-12-131-3/+8
| | | | Fixes: `Unexpected exception occured: PKCS#11 RSA sign/verify does not support EMSA EMSA4(SHA-512,MGF1,64)`
* Fix MSVC warnings in PKCS11Jack Lloyd2019-12-066-25/+36
|
* Deprecate DER_Encoder::get_contents_unlockedJack Lloyd2019-10-282-1/+5
| | | | | | | It's better to use the version taking the vector in the constructor as otherwise we store to locked memory then copy out at the end. Convert all library uses.
* Remove use of pow_mod.h from PKCS11 RSA codeJack Lloyd2019-08-231-4/+1
|
* Merge GH #2070 Precompute RSA Montgomery paramsJack Lloyd2019-08-232-19/+19
|\
| * Fixes for PKCS11Jack Lloyd2019-08-172-19/+19
| |
* | Serialize the PKCS11 testsJack Lloyd2019-08-201-0/+2
|/ | | | See #2072
* Merge GH #1979 Fix PKCS11 buffer output sizingJack Lloyd2019-06-051-10/+30
|\
| * Fix PKCS#11 C_SignFinal output size.Daniel Wyatt2019-05-271-1/+6
| |
| * Fix PKCS#11 C_Sign output size.Daniel Wyatt2019-05-271-2/+7
| |
| * Fix PKCS#11 C_Encrypt output size.Daniel Wyatt2019-05-271-2/+7
| |
| * Fix PKCS#11 C_Decrypt buffer output size.Daniel Wyatt2019-05-261-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | Section 5.2 of the spec states that there are two ways to call functions that return a variable-length buffer: 1. When the output buffer is NULL, an estimated size is returned (which may be larger than required). 2. When the output buffer is not NULL, the exact size must be returned. So only after the second call to C_Decrypt has the final output size been determined, and we must resize the output buffer.
* | SoftHSM 2.5.0 compatibilityDaniel Neus2019-05-281-1/+1
|/ | | | Fixes "src\lib\softhsm.cpp(10191): CKA_VALUE_LEN does not have the size of CK_ULONG"
* Fix some warnings with Clang 8Jack Lloyd2019-05-083-21/+5
| | | | | | Notably several from the new -Wdefaulted-function-deleted Also remove some compat macro checks for MSVC 2013
* Add error_code to PKCS11 return exceptionJack Lloyd2019-04-261-0/+5
|
* Remove tab charactersJack Lloyd2019-04-104-468/+468
|
* Remove EMSA1 encodings from p11 sign mechanisms mapHannes Rantzsch2018-12-101-5/+0
|
* Extend the SignMechanisms map for Signature_Scheme padding stringsHannes Rantzsch2018-12-041-0/+15
| | | | | | This addresses #730. The tls_sign_message callback was unable to handle emsa strings produced as padding strings for TLS::Signature_Scheme, due to inconsistent naming (mostly between EMSA3 and EMSA_PKCS1).
* Make exceptions easier to translate to error codesJack Lloyd2018-11-233-6/+8
| | | | | | | | | | | Avoid throwing base Botan::Exception type, as it is difficult to determine what the error is in that case. Add Exception::error_code and Exception::error_type which allows (for error code) more information about the error and (for error type) allows knowing the error type without requiring a sequence of catches. See GH #1742
* Avoid calling memset, memcpy within library codeJack Lloyd2018-11-171-2/+2
| | | | | | | | | Prefer using wrappers in mem_utils for this. Current exception is where memcpy is being used to convert between two different types, since copy_mem requires input and output pointers have the same type. There should be a new function to handle conversion-via-memcpy operation.
* move instead of copyrumcajs2018-10-141-1/+1
|
* Remove support for Visual C++ 2013Jack Lloyd2018-10-016-6/+6
| | | | Closes GH #1557
* Fix more MSVC warningsJack Lloyd2018-10-011-7/+31
|
* Fix more MSVC warningsJack Lloyd2018-10-013-16/+39
|
* Add RandomNumberGenerator::accepts_inputJack Lloyd2018-09-061-0/+3
|
* Add function to return the size of a key agreement outputJack Lloyd2018-08-121-0/+1
| | | | Very useful when using "Raw" DH/ECDH via the FFI API.
* Add functions to get size of PK ciphertext,plaintextJack Lloyd2018-08-101-0/+4
| | | | Needed for https://github.com/strongswan/strongswan/pull/109
* Add PK_Signer::signature_lengthJack Lloyd2018-08-102-0/+4
|
* Add PointGFp::encode as replacement for EC2OSPJack Lloyd2018-03-102-2/+2
| | | | | | Literally every single call to EC2OSP is converting the returned secure_vector to a std::vector. Which makes sense since private points are not really a thing in any protocol I know of.
* Ensure exception types are exported from DLLJack Lloyd2018-03-061-2/+2
| | | | GH #983
* Fix compliation problem in PKCS11Jack Lloyd2018-02-076-1/+6
| | | | | | | | | ./configure.py --amal --mini --enable-modules=pkcs11 would fail to build because the guarded includes of pk_keys.h ended up hiding the declaration entirely. This is really a bug in how the amalgamation is generated but may be hard to fix in the general case.
* Use shared representation of EC_GroupJack Lloyd2018-01-311-5/+5
| | | | Hide CurveGFp with an eye for eventual removal
* Avoid empty methods, use =default or add a commentJack Lloyd2017-10-031-3/+0
| | | | Sonar
* Remove protected m_handle data from PKCS11::ObjectJack Lloyd2017-10-023-6/+18
|
* More header cleanupsJack Lloyd2017-09-231-1/+0
|
* Apply final annotations to the library alsoJack Lloyd2017-09-228-14/+14
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* More include header cleanupsJack Lloyd2017-09-211-0/+1
|
* Header file cleanupsJack Lloyd2017-09-212-1/+1
| | | | Some help from include-what-you-use
* Clean up header includesJack Lloyd2017-09-217-12/+6
| | | | | | | Avoid including build.h or assert.h directly, instead always take them though types.h Avoid math.h in favor of cmath
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2012-24/+24
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-1911-43/+43
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Fix warnings from clangs -Wdocumentation flagJack Lloyd2017-07-282-2/+2
|
* Content:Tomasz Frydrych2017-04-034-6/+4
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-021-1/+3
|
* Enable PKCS11 module by default and remove --with-pkcs11 optionRené Korthaus2017-01-111-2/+0
| | | | | | The pkcs11 module once required the pkcs11 headers as an external dependency, but the headers were included a while ago. Still, the module was set to be load_on vendor. Instead, we can enable the module by default now.
* Add try/catch blocks in noexcept destructors that might throwJack Lloyd2017-01-063-8/+29
| | | | Flagged by Coverity
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1816-145/+145
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.