| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Also forward declare the DLL wrapper class rather than including it
|
|
|
|
|
| |
Deprecate asn1_str.h asn1_time.h asn1_oid.h and alg_id.h with all
contents moved to existing asn1_obj.h
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixes: `Unexpected exception occured: PKCS#11 RSA sign/verify does not support EMSA EMSA4(SHA-512,MGF1,64)`
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\ |
|
| | |
|
|/
|
|
| |
See #2072
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
Fixes "src\lib\softhsm.cpp(10191): CKA_VALUE_LEN does not have the size of CK_ULONG"
|
|
|
|
|
|
| |
Notably several from the new -Wdefaulted-function-deleted
Also remove some compat macro checks for MSVC 2013
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Closes GH #1557
|
| |
|
| |
|
| |
|
|
|
|
| |
Very useful when using "Raw" DH/ECDH via the FFI API.
|
|
|
|
| |
Needed for https://github.com/strongswan/strongswan/pull/109
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
GH #983
|
|
|
|
|
|
|
|
|
| |
./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.
|
|
|
|
| |
Hide CurveGFp with an eye for eventual removal
|
|
|
|
| |
Sonar
|
| |
|
| |
|
|
|
|
|
| |
Done by a perl script which converted all classes to final, followed
by selective reversion where it caused compilation failures.
|
| |
|
|
|
|
| |
Some help from include-what-you-use
|
|
|
|
|
|
|
| |
Avoid including build.h or assert.h directly, instead always take
them though types.h
Avoid math.h in favor of cmath
|
|
|
|
|
|
| |
ISO C++ reserves names with double underscores in them
Closes #512
|
|
|
|
|
| |
Defined in build.h, all equal to BOTAN_DLL so ties into existing
system for exporting symbols.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Flagged by Coverity
|
|
|
|
|
|
| |
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.
|