summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Added misc. compiler optimisationsDavid Sommerseth2009-09-262-8/+14
|
* Moved from bzero() to memset()David Sommerseth2009-09-261-1/+1
|
* Don't assert() if the input XML doc to eurephiaXML_IsResult() is NULL.David Sommerseth2009-09-261-1/+4
|
* Added extra check on node pointer, to avoid possible SEGVDavid Sommerseth2009-09-261-1/+1
|
* Added eurephiaXML_IsResultMsg() to check if an XML doc is a ResultMsg documentDavid Sommerseth2009-09-252-0/+17
|
* Moved the useful append_str() macro from sqlite.c to eurephia_nullsafe.hDavid Sommerseth2009-09-251-0/+11
|
* Fixed and cleaned up Doxygen commentsDavid Sommerseth2009-09-221-2/+14
|
* Rewrote eurephiaXML_ResultMsg() to also support adding an xmlNode* with more ↵David Sommerseth2009-09-212-10/+75
| | | | | | | | info The eurephia result XML document is also changed, and all parsing of the result must be rewritten. To simplify this parsing, a new function is introduced, eurephiaXML_ParseResultMsg().
* BUGFIX: saltlen was set to 0 when a buffer for a new salt was generatedDavid Sommerseth2009-09-151-12/+12
| | | | | | This error caused eurephia_pwd_crypt() to fail, especially when salt length was requested to be longer. The solution was to retrieve the salt length before allocating memory for it.
* Fixed some new Doxygen warnings which came after enabling static functions ↵David Sommerseth2009-09-142-6/+3
| | | | and vars
* Added eRemove_value() function, to remove a key/value pair from an ↵David Sommerseth2009-09-142-3/+48
| | | | eurephiaVALUES chain
* Added a simple xmlNode iterator for future usageDavid Sommerseth2009-09-141-0/+8
|
* Corrected some doxygen issues after rearranging the sqlite3 db driver codeDavid Sommerseth2009-09-131-1/+1
|
* Some simple comments to the SHA512 implementationDavid Sommerseth2009-09-112-8/+50
|
* Workaround to avoid confusing Doxygen on some extra declarationsDavid Sommerseth2009-09-111-2/+3
|
* Fixed comments to malloc_nullsafe() and free_nullsafe()David Sommerseth2009-09-072-7/+20
|
* Added debug logging of free_nullsafe() calls as wellDavid Sommerseth2009-09-076-13/+24
|
* Moved all malloc() operations over to a calloc wrapper, malloc_nullsafe()David Sommerseth2009-09-076-14/+95
| | | | This also improves debugging as well, if debug logging is enabled and log level is >= 40.
* Removed header file which is no longer neededDavid Sommerseth2009-09-051-43/+0
|
* More comments in common/David Sommerseth2009-09-0419-83/+354
|
* Doxygen comments to eurephia_context.hDavid Sommerseth2009-09-041-20/+28
|
* Added more comments to the common filesDavid Sommerseth2009-09-029-15/+349
|
* Added copyright info in CMake filesDavid Sommerseth2009-09-021-0/+19
|
* Cleaned up main CMakeLists.txt fileDavid Sommerseth2009-09-021-2/+11
|
* Added missing #include statementsDavid Sommerseth2009-09-021-0/+1
|
* Improved comments for common/CMakeLists.txtDavid Sommerseth2009-09-021-0/+9
|
* Rewritten CMake rules to build common/ as static libraryDavid Sommerseth2009-04-111-0/+19
| | | | | | This static library is later on linked in. This is to avoid recompiling the same source files several times during a complete eurephia compilation.
* Rewritten common/passwd.c and utils/benchmark.cDavid Sommerseth2009-04-101-42/+1
| | | | Make them work without the need of defining BENCHMARK during compilation
* Make eurephiaXML_getRoot(...) return root element when no nodeset is givenDavid Sommerseth2009-04-021-1/+1
|
* Added simple function for returning results and errors as XMLDavid Sommerseth2009-04-022-0/+44
|
* Fixed some possible issues with the XML implementation, regarding UTF-8David Sommerseth2009-03-291-2/+17
| | | | | | Do proper conversion from char * to xmlChar *. Need to figure out a better way how to return xmlChar * to char * when returning strings which may contain UTF-8.
* Fixed a "hang" when wrong password was usedDavid Sommerseth2009-03-281-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the current implementation of SHA512 salts, it could be experienced as if the application hung on wrong passwords. This is because the rounds count for the passwords are scrambled, with values based on the given password. When a wrong password is given, this will also result in getting a wrong salt length and hash rounds for the following hash calculation. Due to this, the extracted rounds value from the salt string could return some really high number of rounds on wrong passwords (possibly the max value if integer). And this is why the "hang" is experienced. To avoid this, a check is added to make sure the rounds is not unreasonably much higher than the configured max rounds values. If the descrambled rounds number from the salt exceeds max rounds * 1.5, the password (most probaly) is wrong. In this case we do a sleep() to slow down bruteforce attacks and return NULL. The drawback is if the maxrounds later on is changed to a value which hits this scenario: passwordsalt_rounds > maxrounds_cfg * 1.5 In this case these old passwords will be invalidated by that configuration change. This is considered to be a feature and not a bug. The reason for mulitiplying by 1.5, is to allow a little room for a degrading the max rounds setting. By adjusting the max rounds up again, these passwords will be valid again. Added also a sleep() when wrong username is attempted.
* Made the licence explicit GPLv2 onlyDavid Sommerseth2009-03-2622-22/+22
|
* Cleaned up the code a little bitDavid Sommerseth2009-03-2622-26/+46
| | | | | Made sure we only include needed include files and checked that the copyright headers are equal and correct
* Avoid segfault if xmlDoc or XML root element is NULL in eurephiaXML_getRoot(...)David Sommerseth2009-03-221-2/+1
|
* Added benchmarking to suggest minimum and maximum rounds for hashesDavid Sommerseth2009-03-221-0/+41
|
* Renamed passwdhash(...) function to eurephia_quick_hash(...)David Sommerseth2009-03-212-36/+31
| | | | | | | | | | This to make it clearer that passwdhash(...) is not good for password hashing, but suitable when you need a quick hashing algorithm. The eurephia_quick_hash(...) are now used for password caching hashing, and is still suitable here since the salt used for the passwords are in memory only and never written to disk, as they are supposed to be temporary hashes.
* Added new password hashing function with proper SHA512 hashingDavid Sommerseth2009-03-212-0/+401
| | | | | | | | | | | | | | | | | | | | | This new function, eurephia_pwd_crypt(...) implements a modified SHA512 hashing algorithm based on the SHA512 crypt implementation proposed by Ulrich Drepper for glibc. The original implementation adds support for variable hashing rounds. The eurephia version implements dynamic hashing rounds, controlled by minimum and maximum rounds set in the configuration. If not set, it will minimum use 5000 rounds and maximum 7500 rounds. The amount of rounds is supposed to be random. In addition to this, the salt information is now encoded into a hex value. In this value the salt length and the hash rounds are defined. This hex value is then encoded (quasi crypt) based on a modulus of the sum of the characters in the password + the password length. So if you give the wrong password, you will also get the wrong salt length and the wrong number of hashing rounds used. The default salt length is also increased to 32 bytes (256 bit)
* Made the destination buffer for random data more type independent (void *)David Sommerseth2009-03-032-2/+2
|
* Added macro for defaultIntvalue() for pure integer valuesDavid Sommerseth2009-03-031-1/+1
|
* Moved eDBsessionGetRandString(...) to a more global and independent ↵David Sommerseth2009-01-104-30/+79
| | | | eurephia_randstring(...) function
* Introduced password caching on authenticated sessionsDavid Sommerseth2009-01-032-0/+6
| | | | | | | | | | | | | | | | | | | | | | This is to prepare eurephia-auth plugin to use other and more CPU intensive hashing algorithms for passwords. In addition, open sessions will now not be rejected/closed due to wrong password if the user changes the password with an open session running. The patch adds a new server_salt attribute in the eurephiaCTX structure. This is used as a temporary salt and is created of random data when OpenVPN is started. When a user is being authenticated (eurephia.c/eurephia_userauth) a authentication session (not the same as a 'normal' session) is opened and checked for a cached password. If it does not exist or match, normal password check will be done against the user database. If a cached password is found and matches, it is considered to be authenticated. The cached password uses the SHA512 algorithm, together with the eurephiaCTX->server_salt.
* Prepared passwdhash function to allow salting and be prepared for other ↵David Sommerseth2009-01-022-27/+37
| | | | hashing algorithms
* Moved the certfile parsing out from certificate.c into parse_certificate_files.cDavid Sommerseth2008-12-212-0/+3
| | | | | Changed certinfo.[ch] to add cert.digest as well, and using this modified struct to handle the parse result after parsing the certfile.
* Corrected wrong declaration of xmlExtractContent(...) and xmlGetNodeContent(...)David Sommerseth2008-12-202-8/+12
|
* Removed all other eurephia admin structs which can be replaced by XMLDavid Sommerseth2008-12-181-36/+0
|
* Removed everything which was connected to the eurephiaUSERINFO struct.David Sommerseth2008-12-183-313/+0
|
* Added common eurephiaXML functions for creating and reading eurephia XML ↵David Sommerseth2008-12-172-0/+59
| | | | documents
* Needed to change from #define macro to function to avoid compiler warningDavid Sommerseth2008-12-151-1/+3
| | | | | | When xmlExtractContent() was used together with the defaultValue() macro, a compiler warning appeared. Changed the xmlExtractContent() macro to a inline function, hopefully the overhead will be minimal with this change.
* Added simple functions for extracting char * from XML nodesDavid Sommerseth2008-12-152-0/+86
|