Modify the supporting information for RSA padding algorithms
[platform/core/security/key-manager.git] / src / manager / client / client-certificate.cpp
1 /* Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd All Rights Reserved
2  *
3  *  Licensed under the Apache License, Version 2.0 (the "License");
4  *  you may not use this file except in compliance with the License.
5  *  You may obtain a copy of the License at
6  *
7  *      http://www.apache.org/licenses/LICENSE-2.0
8  *
9  *  Unless required by applicable law or agreed to in writing, software
10  *  distributed under the License is distributed on an "AS IS" BASIS,
11  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  *  See the License for the specific language governing permissions and
13  *  limitations under the License
14  *
15  *
16  * @file        client-key-impl.h
17  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
18  * @version     1.0
19  * @brief       Certificate class implementation.
20  */
21
22 #include <ckm/key-manager.h>
23
24 #include <client-certificate-impl.h>
25
26 namespace CKM {
27
28 Certificate::Certificate(){}
29
30 Certificate::Certificate(const RawBuffer &rawData, Format format)
31   : m_impl(new CertificateImpl(rawData, format))
32 {}
33
34 Certificate::Certificate(const Certificate &second) {
35     m_impl = second.m_impl;
36 }
37
38 Certificate& Certificate::operator=(const Certificate &second) {
39     m_impl = second.m_impl;
40     return *this;
41 }
42
43 bool Certificate::empty() const {
44     if (m_impl)
45         return m_impl->empty();
46     return true;
47 }
48
49 RawBuffer Certificate::getDER() const {
50     if (m_impl)
51         return m_impl->getDER();
52     return RawBuffer();
53 }
54
55 void* Certificate::getX509() {
56     // TODO
57     return NULL;
58 }
59
60 } // namespace CKM
61