aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509/x509_ext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix more MSVC warningsJack Lloyd2018-10-011-1/+1
|
* If cert extension parsing fails, replace the object with UnknownJack Lloyd2018-08-231-1/+2
| | | | | | Allows the parse to complete and even allows examining the extension. GH #1652
* Simplify exception messagesJack Lloyd2018-08-221-1/+1
| | | | Remove "Invalid argument" and "Decoding Error" prefixes
* DER improvementsJack Lloyd2018-05-221-23/+37
| | | | | | | | | | | Let DER_Encoder write to a user specified vector instead of only to an internal vector. This allows encoding to a std::vector without having to first write to a locked vector and then copying out the result. Add ASN1_Object::BER_encode convenience method. Replaces X509_Object::BER_encode which had the same logic but was restricted to a subtype. This replaces many cases where DER_Encoder was just used to encode a single object (X509_DN, AlgorithmIdentifier, etc).
* Remove debug assignment [ci skip]Jack Lloyd2018-04-161-1/+0
|
* Truncate new SKIDs to 192 bitsJack Lloyd2018-04-161-0/+6
| | | | | More than long enough, and saves quite a bit of space especially for SHA-512 certificates.
* Allow applications to easily override extensions in cert requestsJack Lloyd2018-01-231-0/+15
| | | | | | | | | | | | | Refactor the code so it's possible to create a cert request without going through x509self.h (PKCS10_Request::create). Add Extensions::add_new, so we can add an extension to a PKCS10 request without stomping on one already included by the application. Refactor the X509 unit tests to avoid (some) duplicated key creations. Just create a key once at the start and use it for all of the tests. GH #1428
* Prepare for making BER_Object members privateJack Lloyd2018-01-181-13/+18
| | | | | Now there are usable accessors that allow the library to avoid using BER_Object members directly.
* use range-based for loop instead of std::for_eachPatrik Fiedler2018-01-031-4/+2
|
* add the detection for the ca issuers field(1.3.6.1.5.5.7.48.2) in x509 ↵Patrik Fiedler2018-01-031-0/+13
| | | | certificates
* Fix some shadow and unused parameter warningsJack Lloyd2017-12-201-4/+6
|
* Fix various x509 path validation bugs + path building with ambiguous DNsFabian Weissberg2017-12-201-5/+51
| | | | Signed-off-by: Fabian Weissberg <[email protected]>
* Fix encoding of subject key identifierJack Lloyd2017-11-161-19/+22
| | | | | | Changed in #884 - we were copying the entire public key as the public key id. Instead hash it with whatever hash we are using to sign the certificate.
* Fix a memory leak in the case where certificate extension decoding fails.Jack Lloyd2017-11-161-18/+18
| | | | | | Introduced in #884 Found by OSS-Fuzz (bug 4249)
* Refactor certificate extension handlingJack Lloyd2017-11-141-191/+192
|
* Remove use of transcodeJack Lloyd2017-11-091-5/+2
|
* Guard against self-assignmentJack Lloyd2017-09-301-0/+3
| | | | Found with Sonar
* Apply final annotations to the library alsoJack Lloyd2017-09-221-1/+1
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Content:Tomasz Frydrych2017-04-031-1/+1
| | | | | | | | | * 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 verify_end() chained immediatly before end_cons() (close #890)Nuno Goncalves2017-02-251-2/+0
| | | | | | | BER_Decoder::end_cons() allready assures the verify_end() function, so it is redundant. Signed-off-by: Nuno Goncalves <[email protected]>
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-33/+33
| | | | | | 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.
* Rename some methods, add more tests and docsRené Korthaus2016-12-041-4/+4
|
* Allow custom extensions in X509_Cert_OptionsRené Korthaus2016-12-021-0/+67
| | | | | Allow custom extensions in CA-signed cert requests Add templated getter for extensions
* Remove ability to add OIDS at runtime. Remove global OID lock.Jack Lloyd2016-11-031-2/+1
| | | | | | | | | | | OID map is now generated from an input file on an as needed basis. Just uses a sequence of ifs - simple, fast, and small code size. Merges oid_lookup sub-module which was already required by asn1 anyway, so completely non-optional. Removes @neusdan's nice OID tests since without any runtime adds the tests are moot.
* Move cert/x509 to top level and pem and pbes2 to pubkey.Jack Lloyd2016-11-031-0/+834
The `cert` dir was just an artifact of having previously supported CVC (smartcard cert format), removed a long time ago. The pem and pbes2 code is directly related to the pubkey code, in fact the only caller of pbes2 (likely anywhere, not just in the library) is in pkcs8.cpp