platform/core/security/key-manager.git
9 years agotagged as Internal for control API
Dong Sun Lee [Fri, 18 Jul 2014 04:57:29 +0000 (13:57 +0900)]
tagged as Internal for control API

Change-Id: I8d3c7178e5232aed0b1aeac7030775dcf0d39f13
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
9 years agosplit doxygen module into 3 sub modules
Dong Sun Lee [Fri, 18 Jul 2014 04:25:41 +0000 (13:25 +0900)]
split doxygen module into 3 sub modules

Change-Id: I2c0aea8cbbc58b024c34c1f031b7179c05e490f5
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
9 years agoadd doc directory for doxygen
Dong Sun Lee [Fri, 18 Jul 2014 00:28:17 +0000 (09:28 +0900)]
add doc directory for doxygen

Change-Id: I51403514aa64297379fbb076a3ef4a854f395531
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
9 years agoVersion 0.1.2
Bartlomiej Grzelewski [Thu, 17 Jul 2014 15:56:11 +0000 (17:56 +0200)]
Version 0.1.2

Add functions:
* Manager::getCertificateChain
* Manager::ocspCheck

Change-Id: I03ebf9b816c44d032132e0df9f5aa53fa8ecc097

9 years agoFix implementation of SetKey.
Bartlomiej Grzelewski [Thu, 17 Jul 2014 15:34:56 +0000 (17:34 +0200)]
Fix implementation of SetKey.

Change-Id: I0075fe26c44313c38b0ee0d7d80b2a1fdf372415

9 years agoAdd SafeBuffer
Krzysztof Jackiewicz [Mon, 7 Jul 2014 07:14:12 +0000 (09:14 +0200)]
Add SafeBuffer

Change-Id: Ic7cb9941742472484cd3c10a2fb9a8e7cf6063e0

9 years agoChange smack labels for sockets.
Bartlomiej Grzelewski [Wed, 16 Jul 2014 13:41:14 +0000 (15:41 +0200)]
Change smack labels for sockets.

Current status:
* key-manager::api-control (gives access to api CKM::Control)
* key-manager::api-ocsp (gives access to api CKM::Manager::ocspCheck)
* key-manager::api-storage (gives access to rest of api implemented in CKM::Manager)

Change-Id: I64a28042e358c88ced34b89d69d3b54f91124dc7

9 years agoReplace tabulators with spaces in ocsp.* files.
Bartlomiej Grzelewski [Wed, 16 Jul 2014 13:35:21 +0000 (15:35 +0200)]
Replace tabulators with spaces in ocsp.* files.

Change-Id: I08ae78cdf69aa7bd759097f2f0a3841f6f80e99b

9 years agoAdd debug logs to ocsp.
Bartlomiej Grzelewski [Mon, 14 Jul 2014 14:18:33 +0000 (16:18 +0200)]
Add debug logs to ocsp.

Change-Id: Ie38b999a0abbf474024c505384c57c144143b9e2

9 years agoImplementation of primitives in CertificateImpl class.
Bartlomiej Grzelewski [Mon, 14 Jul 2014 14:15:15 +0000 (16:15 +0200)]
Implementation of primitives in CertificateImpl class.

Now you can extrat values of Subject/Issuer fiels directly from
CertificateImpl class.

Change-Id: I521df36d1fddd384ace13a5e338f3914221f5dbe

9 years agoFix compilation error in c-api.
Bartlomiej Grzelewski [Wed, 16 Jul 2014 13:04:15 +0000 (15:04 +0200)]
Fix compilation error in c-api.

Change-Id: I923ae176c42e447ae6a9e10da5d518b9bb32c41b

9 years agoChanges in Prefix ckm->ckmc in C API
Dong Sun Lee [Wed, 16 Jul 2014 08:35:32 +0000 (17:35 +0900)]
Changes in Prefix ckm->ckmc in C API

Change-Id: I5c1c60eb51ba46a73125b8a94ba09722b2604438
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
9 years agoFix names of C language client APIs
yuseok.jeon [Wed, 16 Jul 2014 05:22:36 +0000 (14:22 +0900)]
Fix names of C language client APIs

Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoAdd exceptions related to control APIs
yuseok.jeon [Tue, 15 Jul 2014 07:56:04 +0000 (16:56 +0900)]
Add exceptions related to control APIs

Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoAdd systemd configuration for ocsp service.
Bartlomiej Grzelewski [Tue, 15 Jul 2014 12:15:57 +0000 (14:15 +0200)]
Add systemd configuration for ocsp service.

Change-Id: Id7ceda142619d38e8df08349fac4a1590ef55ef2

9 years agoOCSP implementation.
Bartlomiej Grzelewski [Fri, 11 Jul 2014 12:03:54 +0000 (14:03 +0200)]
OCSP implementation.

Change-Id: I4cf8d99b0c3ec262c7f65e5fc3b7ef2fca2b3287

9 years agoAdd explanations of C client APIs
yuseok.jeon [Mon, 14 Jul 2014 11:33:00 +0000 (20:33 +0900)]
Add explanations of C client APIs

Change-Id: If88a537ebc911e9f58051cef97e5ce3c81cadf88
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoFix build break.
Bartlomiej Grzelewski [Fri, 11 Jul 2014 14:30:19 +0000 (16:30 +0200)]
Fix build break.

Change-Id: I95a59f803d1f07841eecc4515de5378a6af431e8

9 years agoFix C language APIs of client
yuseok.jeon [Thu, 10 Jul 2014 06:29:39 +0000 (15:29 +0900)]
Fix C language APIs of client

Change-Id: I0fa3f99328d61f67ca97ac7bbdc851d09dbe5002

9 years agoFix bugs.
Bartlomiej Grzelewski [Thu, 10 Jul 2014 09:38:17 +0000 (11:38 +0200)]
Fix bugs.

Socket activation did not work because systemd sockets names did not
match socket names provided by services.

Change-Id: Ice4a0db2eee0ab7d6b5ef60be0e2a5dabb41d69d

9 years agoAdd crypto module.
Bartlomiej Grzelewski [Fri, 4 Jul 2014 16:54:03 +0000 (18:54 +0200)]
Add crypto module.

Reiplementation of crypto-logic (old name DBCryptoModule).

Change-Id: Id1bdd4d48ee342ede3cf8cb78ff6c30a294ec541

9 years agoAdded initial version of aesCrypt and Digest modules.
Sebastian Grabowski [Mon, 16 Jun 2014 13:33:34 +0000 (15:33 +0200)]
Added initial version of aesCrypt and Digest modules.

Added new classes for handling AES encryption and digest calculation.

Change-Id: Ic538130ff86eb53ee5c0446212e1cf628cca708e

9 years agoFix compilation errors in c-api.
Bartlomiej Grzelewski [Tue, 8 Jul 2014 12:02:41 +0000 (14:02 +0200)]
Fix compilation errors in c-api.

Change-Id: Id22a79b12decc43b3b16c50fc70c14814358fdf0

9 years agoFix errors find by valgrid.
Bartlomiej Grzelewski [Mon, 7 Jul 2014 19:21:41 +0000 (21:21 +0200)]
Fix errors find by valgrid.

Change-Id: Id123d90a8c59ac0b72c3d95823bf22c03de371d5

9 years agomake use of C++ error in C API
Dong Sun Lee [Mon, 7 Jul 2014 23:59:03 +0000 (08:59 +0900)]
make use of C++ error in C API

Change-Id: I32e2579ce15c97ede76b7bdc0ab33df6e654ac77
Signed-off-by: Dong Sun Lee <ds73.lee@samsung.com>
9 years agoRemove all namespaces from ckm-error.h header.
Bartlomiej Grzelewski [Mon, 7 Jul 2014 12:26:42 +0000 (14:26 +0200)]
Remove all namespaces from ckm-error.h header.

Change-Id: I90e6d818fa42e486356926107ae069e439010f02

9 years agoAdd C language APIs of client
yuseok.jeon [Mon, 7 Jul 2014 02:27:01 +0000 (11:27 +0900)]
Add C language APIs of client

Change-Id: I24ef238e49715624280cef1b4ea31f802be66ff5
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoVersion 0.1.1
Bartlomiej Grzelewski [Thu, 3 Jul 2014 16:51:43 +0000 (18:51 +0200)]
Version 0.1.1

Change-Id: Ief6b876ab47b96fe204fa1b16422230e198014b1

9 years agoCompilation fix for tizen.org
Bartlomiej Grzelewski [Thu, 3 Jul 2014 12:53:56 +0000 (14:53 +0200)]
Compilation fix for tizen.org

Change-Id: Ibbf2ca2ff1738b91d6ebb705bf585b96a8656261

9 years agoImplementation of getCertificateChain.
Bartlomiej Grzelewski [Thu, 3 Jul 2014 12:50:23 +0000 (14:50 +0200)]
Implementation of getCertificateChain.

Change-Id: Ib4f954ee9d0b35fd550fb67216ba1d420e1326db

9 years agoRelease version 0.1.0
Bartlomiej Grzelewski [Wed, 2 Jul 2014 17:23:13 +0000 (19:23 +0200)]
Release version 0.1.0

Change-Id: I14c6ebda6414350172940c6fa489809e7059a0d0

9 years agoRename RSAPadddingAlgorithms values.
Bartlomiej Grzelewski [Wed, 2 Jul 2014 17:04:06 +0000 (19:04 +0200)]
Rename RSAPadddingAlgorithms values.

Old values does not have any sense because there is no such algorithm
as XRSA.

Change-Id: I9e10dc4507f910ba8d37d2cb8746c2b0196af1b4

9 years agoAdd log colouring formatter for boost utf
Zofia Abramowska [Wed, 2 Jul 2014 09:09:44 +0000 (11:09 +0200)]
Add log colouring formatter for boost utf

Change-Id: I89a56caeed30e97e3046a5852652ec9f74ca727b

9 years agoRewrite key provider tests
Zofia Abramowska [Fri, 27 Jun 2014 15:48:23 +0000 (17:48 +0200)]
Rewrite key provider tests

Change-Id: I7d9919898df3e0bb80ce2d83af11061d70c6f533

9 years agoSimpliefied public headers names.
Bartlomiej Grzelewski [Wed, 2 Jul 2014 14:20:01 +0000 (16:20 +0200)]
Simpliefied public headers names.

key-manager.h was renamed to ckm-manager.h
key-manager-control.h was renamed to ckm-control.h

Change-Id: Ia76e6891dfe8196e2a5d7db8c55a50a1ab33afdd

9 years agoChange log tag to CKM.
Bartlomiej Grzelewski [Wed, 2 Jul 2014 12:41:33 +0000 (14:41 +0200)]
Change log tag to CKM.

Change-Id: I488ee6e5ebe4efbf9f342a5f9c29fd6c8f15e73c

9 years agoFunction verifySignature may take certificate alias now.
Bartlomiej Grzelewski [Wed, 2 Jul 2014 12:22:49 +0000 (14:22 +0200)]
Function verifySignature may take certificate alias now.

Change-Id: I1f8d9281acb77b69cb126ab0df61c6990f234cc7

9 years agoSplit client API into two parts(Control API and Store/Crypto API)
yuseok.jeon [Wed, 2 Jul 2014 02:36:15 +0000 (11:36 +0900)]
Split client API into two parts(Control API and Store/Crypto API)

Change-Id: I60d564a125a2bf493b941897d521ea9adae8a499
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoYou may extract public key from CertificateImpl now.
Bartlomiej Grzelewski [Tue, 1 Jul 2014 15:59:42 +0000 (17:59 +0200)]
You may extract public key from CertificateImpl now.

Change-Id: I3c0ed204e2622b0e8a6ca4be5c39f91d6c009def

9 years agoFix createSignature/verify signature module.
Bartlomiej Grzelewski [Tue, 1 Jul 2014 10:15:18 +0000 (12:15 +0200)]
Fix createSignature/verify signature module.

* Fix implementation of ErrorToString.
* Fix protocol implementation in ckm-logic.
* Fix implementation of CryptoModule.

Change-Id: Ifd60709829ffe433bd982819a32dcac8223d07f2

9 years agoAdd openssl initialization in client library.
Bartlomiej Grzelewski [Mon, 30 Jun 2014 18:46:16 +0000 (20:46 +0200)]
Add openssl initialization in client library.

Change-Id: I1043801db5743d855902c85c16a9acb22c3ed3a0

9 years agoRemove function strictCAcheck.
Bartlomiej Grzelewski [Mon, 30 Jun 2014 14:33:08 +0000 (16:33 +0200)]
Remove function strictCAcheck.

This functionality is checked by default when FIBS mode is turned on.

Change-Id: I6f1ddcf06231c16613f968b8bc03fed141add762

9 years agofix CryptoService ititialize method
yuseok.jeon [Tue, 1 Jul 2014 07:08:19 +0000 (16:08 +0900)]
fix CryptoService ititialize method

Change-Id: I4c42f6a5023fc48d85132c60f556cdadb00c6438
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years ago Service implementation.
Radoslaw Bartosiak [Mon, 23 Jun 2014 13:31:31 +0000 (15:31 +0200)]
 Service implementation.

       * Add support for createSignature and verifySignature

Change-Id: Id85e45ffc166678d1a97596c2c134eafcc22024c

9 years agoAdd internal tests for sql and db
Zofia Abramowska [Tue, 10 Jun 2014 08:46:42 +0000 (10:46 +0200)]
Add internal tests for sql and db

Add internal tests for SqlConnection class and DBCrypto
(with Transaction) class.

Change-Id: I5950aa4ed6f9da9effe1aec0bfacaf1957a752f3

9 years agoChange some error messages to debug.
Bartlomiej Grzelewski [Thu, 26 Jun 2014 16:40:37 +0000 (18:40 +0200)]
Change some error messages to debug.

Add additional debug messages.

Change-Id: I8f92f0b55a5ff2f3a3fa4a85a1687cc27d090e48

9 years agoImplementation of getCertificateChain.
Bartlomiej Grzelewski [Wed, 25 Jun 2014 17:32:12 +0000 (19:32 +0200)]
Implementation of getCertificateChain.

Change-Id: Ie4b8b6f9d54decb3e8e09a04a3bab101630d355a

9 years agoAdd exceptions to OCSP module
yuseok.jeon [Thu, 26 Jun 2014 07:02:36 +0000 (16:02 +0900)]
Add exceptions to OCSP module

Change-Id: I94a15868fe08586fec4af802d7353d6a07ec1075
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoAdd exceptions to CryptoModule
yuseok.jeon [Thu, 26 Jun 2014 05:27:44 +0000 (14:27 +0900)]
Add exceptions to CryptoModule

Change-Id: I47239f59c8017be5d70ce09126de6ae72363a804
Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoPrepare test code for future additional binaries
Zofia Abramowska [Mon, 23 Jun 2014 13:23:59 +0000 (15:23 +0200)]
Prepare test code for future additional binaries

Remove unnecessary dependencies.
Change name of test sources.
Change name of test binary.
Fix formatting.

Change-Id: Iaa39359c224c13714095f4bbafdef742e046563e

9 years agoReplace deprecated auto_ptr with unique_ptr in SQLCOnnection.
Bartlomiej Grzelewski [Tue, 24 Jun 2014 15:34:20 +0000 (17:34 +0200)]
Replace deprecated auto_ptr with unique_ptr in SQLCOnnection.

Change-Id: I0303d7c1c40e3392173899bf42751800eab2e7b6

9 years agoChange error code names.
Bartlomiej Grzelewski [Tue, 24 Jun 2014 15:15:52 +0000 (17:15 +0200)]
Change error code names.

Old prefix was "KEY_MANAGER_API_"
New prefix is "CKM_API_"

Change-Id: I9bce2da2c08d6768ff0fd8ff160ea3dcafb559a7

9 years agoFix implementation of CKMLogic::createRSAKeyPair
Bartlomiej Grzelewski [Tue, 24 Jun 2014 15:01:07 +0000 (17:01 +0200)]
Fix implementation of CKMLogic::createRSAKeyPair

Change-Id: Iec20f8c36337df6d2c836482cb6b9caa5605ab07

9 years agoTransactions
Zofia Abramowska [Wed, 18 Jun 2014 12:17:06 +0000 (14:17 +0200)]
Transactions

Add transaction object to DBCyrpto class.
All public methods are also inside single transactions.

Change-Id: I9bebc69c4c9d3b1d0bce14e227f24c17b44e9afb

9 years agoThrow instead of return value
Zofia Abramowska [Wed, 18 Jun 2014 13:50:19 +0000 (15:50 +0200)]
Throw instead of return value

All public methods of DBCrypto throw instead of returning
value from key-manager api error codes.
Rewritten also ckm-logic to handle exceptions from DBCrypto.

Change-Id: Ie85cb8b4e448e23aa26782d8a5451a5fcfed81e8

9 years agoFix initialization method of CryptoService
yuseok.jeon [Tue, 24 Jun 2014 09:56:59 +0000 (18:56 +0900)]
Fix initialization method of CryptoService

Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoFix initialization method of OCSP
root [Tue, 24 Jun 2014 01:34:10 +0000 (10:34 +0900)]
Fix initialization method of OCSP

Change-Id: I200b3d1f9250ee40796a7895ded605c124b972a2

9 years agoFix errors in client.
Bartlomiej Grzelewski [Mon, 23 Jun 2014 14:17:30 +0000 (16:17 +0200)]
Fix errors in client.

Change-Id: I5634f3ff2981663ee34026dc4860153604a49f17

9 years agoRename KEY_MANAGER_API_ERROR_DB_BAD_REQUEST.
Bartlomiej Grzelewski [Mon, 23 Jun 2014 13:59:47 +0000 (15:59 +0200)]
Rename KEY_MANAGER_API_ERROR_DB_BAD_REQUEST.

New name is KEY_MANAGER_API_ERROR_DB_ALIAS_UNKNOWN

Change-Id: Iad75fa44e19dfcf62f5ee9a647e9cd8963189f93

9 years agoChange internal implementation from RSA* to EVP_PKEY.
Bartlomiej Grzelewski [Fri, 20 Jun 2014 09:07:33 +0000 (11:07 +0200)]
Change internal implementation from RSA* to EVP_PKEY.

Change-Id: I74fbba7c489b4b9dee1d01b72d22d80ccf4bfc4b

9 years agoFix input value of fts_open in key-manager-util.cpp
yuseok.jeon [Fri, 20 Jun 2014 09:27:51 +0000 (18:27 +0900)]
Fix input value of fts_open in key-manager-util.cpp

Signed-off-by: yuseok.jeon <yuseok.jeon@samsung.com>
9 years agoremove useless code
kyungwook tak [Fri, 20 Jun 2014 08:11:22 +0000 (17:11 +0900)]
remove useless code

Change-Id: Ieb7a82147ab1a43a97196cfb691941f6349915da
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoFix error in SKMM-dummy with SKMM replacement and fix some indents
kyungwook tak [Fri, 20 Jun 2014 07:50:06 +0000 (16:50 +0900)]
Fix error in SKMM-dummy with SKMM replacement and fix some indents

Change-Id: I563f57689c68a93458daec75f6de27ef830fefe0
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoAdd copy constructor of CertificateImpl
yuseok.jeon [Fri, 20 Jun 2014 06:57:39 +0000 (15:57 +0900)]
Add copy constructor of CertificateImpl

Change-Id: Idacb1fbc6de68dd6598b46a9288b6a8c877048a2

9 years agoFix Ip label attribute name for systemd
Zofia Abramowska [Wed, 18 Jun 2014 15:48:25 +0000 (17:48 +0200)]
Fix Ip label attribute name for systemd

Change-Id: Idef7a314928ff4eb8ffe8b90259df3afe701b4d8

9 years agoIntegration with CryptoService class.
Bartlomiej Grzelewski [Mon, 16 Jun 2014 16:27:03 +0000 (18:27 +0200)]
Integration with CryptoService class.

Implementation of CKMLogic::createPairKeyRSA.
Replace KeyImpl with GenericKey class.

Change-Id: I24d2c89c3df702666b0b82ba2894ed6313e6393b

9 years agoAdd key-manager internal test tool by using boost test framework
kyungwook tak [Wed, 18 Jun 2014 05:59:58 +0000 (14:59 +0900)]
Add key-manager internal test tool by using boost test framework

Change-Id: I1237a2ee47a6765b6a2e7ccd6ca34509aa3884c9
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoChange pedantic to error logs when failing
Zofia Abramowska [Mon, 16 Jun 2014 11:34:19 +0000 (13:34 +0200)]
Change pedantic to error logs when failing

Change-Id: I051caf9ad38f1243e25f42a8c844288ff451ef31

9 years agoAdd label and unique alias check
Zofia Abramowska [Fri, 13 Jun 2014 14:35:02 +0000 (16:35 +0200)]
Add label and unique alias check

Add label check in row select and check for global alias duplicates.
Change return value when alias duplication occures.

Change-Id: I288d1e5a3c167a909619fa1969319416d7cec813

9 years agoImplementation of CKMLogic::getDataList function.
Bartlomiej Grzelewski [Fri, 13 Jun 2014 14:48:00 +0000 (16:48 +0200)]
Implementation of CKMLogic::getDataList function.

* Rename Manager::requestKeyAliasVector to getKeyAliasVector.
* add support for Manager::getKeyAliasVector function

Change-Id: If10273ba01711b1d726fa19424913029b1f2edab

9 years agoFix to db.
Bartlomiej Grzelewski [Fri, 13 Jun 2014 17:20:26 +0000 (19:20 +0200)]
Fix to db.

Change-Id: I18d992de041ce21c22f644895e36f97102f49c49

9 years agoAdd type check in select commands
Zofia Abramowska [Fri, 13 Jun 2014 14:56:20 +0000 (16:56 +0200)]
Add type check in select commands

Change-Id: I99370b663d46ba4cf7776f842531d5393a8eb393

9 years agoIntegration DBCryptoModule, KeyProvider and CKMLogic.
Bartlomiej Grzelewski [Wed, 11 Jun 2014 17:35:32 +0000 (19:35 +0200)]
Integration DBCryptoModule, KeyProvider and CKMLogic.

* keys in database are encrypted now.
* refactoring of CKMLogic::getData and CKMLogic::saveData
* change timeout for connection from 2 to 4 seconds (creation
  of database may take 2 seconds).

Change-Id: I44d21e8d2a77dd3b7c77e4a1615c4bcb61927344

9 years agoMake structure containers to handle memory in key-provider
kyungwook tak [Thu, 12 Jun 2014 12:14:56 +0000 (21:14 +0900)]
Make structure containers to handle memory in key-provider

Make WrappedKeyMaterialContainer class for handling memory for WrappedKeyMaterial structure
Replace space with tab

Change-Id: I2fdd44d9980fcb7a8f2992aaa3f4d3aaad6c5f19
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoChange return value for DBCrypto
Zofia Abramowska [Thu, 12 Jun 2014 08:34:57 +0000 (10:34 +0200)]
Change return value for DBCrypto

Change from BAD_REQUEST to DB_BAD_REQUEST

Change-Id: I45ef7c1e2fe35e387b3d2f696f74fc608e7624e0

9 years agoAdd table for storing keys per label
Zofia Abramowska [Wed, 11 Jun 2014 13:00:35 +0000 (15:00 +0200)]
Add table for storing keys per label

Change-Id: Ifb30bd2c70fe75e7c78d492c652797cbc74d29d9

9 years agoModify key-provider API name 'unwrapDEK' to 'getPureDEK'
kyungwook tak [Thu, 12 Jun 2014 01:26:42 +0000 (10:26 +0900)]
Modify key-provider API name 'unwrapDEK' to 'getPureDEK'

Fix key returned by 'getPureDEK' had wrong size
for the same reason with 'getPureDomainKEK'

Change-Id: I42df2cdacf580bb761242c046e8a532681196086
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoAdd support for certificate.
Bartlomiej Grzelewski [Wed, 11 Jun 2014 13:24:02 +0000 (15:24 +0200)]
Add support for certificate.

Change-Id: I60d95bfa9ecc0741437de83c7964843fb9081f52

9 years agoAdded exceptions to DBCryptoModule and DBCMAlgType type for algorithmType
Sebastian Grabowski [Thu, 5 Jun 2014 14:47:41 +0000 (16:47 +0200)]
Added exceptions to DBCryptoModule and DBCMAlgType type for algorithmType

Change-Id: I1d1c66f45a79523da73d762f3b09abf1bb7dee41

9 years agoFix: key returned by getDomainKEK had wrong size.
Bartlomiej Grzelewski [Wed, 11 Jun 2014 13:53:57 +0000 (15:53 +0200)]
Fix: key returned by getDomainKEK had wrong size.

Change-Id: I7c1e0007425cae59cbd41795095230cfbfd81ab5

9 years agoTypo fix: initailize to initialize in ocsp.
Sebastian Grabowski [Mon, 9 Jun 2014 11:01:39 +0000 (13:01 +0200)]
Typo fix: initailize to initialize in ocsp.

Change-Id: If2d3dc2ddc456094ac7002fb523653275722055d

9 years agoAdd missing error descriptions in clinet-error.cpp
Bartlomiej Grzelewski [Wed, 11 Jun 2014 13:47:45 +0000 (15:47 +0200)]
Add missing error descriptions in clinet-error.cpp

Change-Id: Ie4583fb14b6344ec0b382d12d453e1fe68a4b320

9 years agoIntegration ckm-logic with database module.
Bartlomiej Grzelewski [Mon, 9 Jun 2014 14:24:48 +0000 (16:24 +0200)]
Integration ckm-logic with database module.

* move db-module from common lib to service executeble.
* add function removeUserData.
* add function getKeyAliases.
* move DBRow struct to new file.

Change-Id: I70bbcd4672014c341f8a0bb476b5bde5f8a56ba5

9 years agoChange primary key for DBCrypto CKM main table
Zofia Abramowska [Tue, 10 Jun 2014 10:28:06 +0000 (12:28 +0200)]
Change primary key for DBCrypto CKM main table

Alias won't be unique between labels. Changed primary key for pair
(alias, label).

Change-Id: I25c8220a0797a6b582dd02b9fdb8eb74e95d789b

9 years agoChange DBCrypto return type
Zofia Abramowska [Tue, 10 Jun 2014 10:15:45 +0000 (12:15 +0200)]
Change DBCrypto return type

Switch from custom enum to key-manager API error codes.

Change-Id: If0023d880c47516bbbc1d9ed911b19af4fee0c23

9 years agoAdd delete method
Zofia Abramowska [Tue, 10 Jun 2014 09:19:28 +0000 (11:19 +0200)]
Add delete method

Deleting the row by alias.

Change-Id: I37ccdaf1d9e4d54158f7d7457e216e6115b34094

9 years agoAdd method const char* ErrorToString(int error)
Bartlomiej Grzelewski [Mon, 9 Jun 2014 14:23:41 +0000 (16:23 +0200)]
Add method const char* ErrorToString(int error)

Change-Id: I09d9a5e3cf13714efae7b272f52b2209f6d2d17a

9 years agoFix DBCrypto class
Zofia Abramowska [Tue, 10 Jun 2014 09:19:28 +0000 (11:19 +0200)]
Fix DBCrypto class

Add isInit() method for checking DB status after constructor.
Fix missing destructor implementation.

Change-Id: I89f94314ae70ea8a7ab7c77b0b923d203a9ad341

9 years agoAdd init to FileSystem class.
Bartlomiej Grzelewski [Mon, 9 Jun 2014 09:18:42 +0000 (11:18 +0200)]
Add init to FileSystem class.

During first start ckm will create /opt/data/ckm directory.

Change-Id: I1b8bcbb2b3f933a1ebac562f9334a79a447bc687

9 years agomodify key-provider on TODO sections and add exception
kyungwook tak [Tue, 10 Jun 2014 05:29:38 +0000 (14:29 +0900)]
modify key-provider on TODO sections and add exception

Change-Id: I61c1c5213f655aae284a72f1a8dcb5626819d37b
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agofix central-key-manager.service filename in .spec file
kyungwook tak [Mon, 9 Jun 2014 11:09:05 +0000 (20:09 +0900)]
fix central-key-manager.service filename in .spec file

Change-Id: I21c9c8a35734f71db75c5e16489ec3d8c202d87b
Signed-off-by: kyungwook tak <k.tak@samsung.com>
9 years agoFix move operator in TransitoryString
Zofia Abramowska [Mon, 9 Jun 2014 15:44:49 +0000 (17:44 +0200)]
Fix move operator in TransitoryString

Change-Id: I619c3d6b65defa1727c5a98814b0c261d88e9020

9 years agoChange SqlConnection behaviour on bad input
Zofia Abramowska [Mon, 9 Jun 2014 16:34:55 +0000 (18:34 +0200)]
Change SqlConnection behaviour on bad input

Changed assert to exception throw.

Change-Id: I561f47ade1b7b1e07424ed1933f16a592825cd0f

9 years agoAdd encrypted database support layer
Zofia Abramowska [Mon, 9 Jun 2014 15:42:32 +0000 (17:42 +0200)]
Add encrypted database support layer

Adding DBCrypto class, which supports creating/inserting/querying
the encrypted database. Remove DBRow struct definition from Module
 header.

Change-Id: I10f502b58b6912bdd1eff6563853f9d183ef59ed

9 years agoAdapt SqlConnection to TransitoryString
Zofia Abramowska [Wed, 4 Jun 2014 14:16:00 +0000 (16:16 +0200)]
Adapt SqlConnection to TransitoryString

Add self wiping out string for wrapping  sqlcipher database encryption
key.

Change-Id: I0d4efda89318e83eea7f3a607a2e80e00365a628

9 years agoAdd self wiping out string
Zofia Abramowska [Wed, 4 Jun 2014 12:41:19 +0000 (14:41 +0200)]
Add self wiping out string

Add TransitoryString class implementation for self wiping out
string used for storing sensitive data (aka key/passwod)

Change-Id: I0c90ce443c93511bd82f1a29083d6b7ea0340809

9 years agoImplementation of Control::unlockUserKey
Bartlomiej Grzelewski [Thu, 5 Jun 2014 16:10:17 +0000 (18:10 +0200)]
Implementation of Control::unlockUserKey

Change-Id: I18510e2c36b599f8bb7f486aad7b81bd9cd01647

9 years agoBuild break fix.
Bartlomiej Grzelewski [Fri, 6 Jun 2014 12:26:08 +0000 (14:26 +0200)]
Build break fix.

Change-Id: Ic0f64b859f716a363462e35f2996fcb9939a2ea9

9 years agoChange user type identification from name to uid.
Bartlomiej Grzelewski [Thu, 5 Jun 2014 15:11:53 +0000 (17:11 +0200)]
Change user type identification from name to uid.

User name is not unique. We need to use kernel understanable value.

Change-Id: I747cb249e430f40104bee6fc694bfe55fe259e81

9 years agoAdd blob support in SqlConnection
Zofia Abramowska [Thu, 5 Jun 2014 14:20:25 +0000 (16:20 +0200)]
Add blob support in SqlConnection

Change-Id: If78176992564ecf614570c00219135482c8c1c88