blob: ffc2b83e6cf110f8866921410dd20416501a375e [file] [log] [blame]
Shawn Willdend67afae2014-08-19 12:36:27 -06001/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Shawn Willden95e13822014-12-15 16:12:16 -070017#include "key.h"
18
Shawn Willden437fbd12014-08-20 11:59:49 -060019#include <openssl/x509.h>
20
Shawn Willden437fbd12014-08-20 11:59:49 -060021#include "openssl_utils.h"
Shawn Willden13fbe3e2015-05-23 03:36:30 +000022#include "unencrypted_key_blob.h"
Shawn Willdend67afae2014-08-19 12:36:27 -060023
Shawn Willdend67afae2014-08-19 12:36:27 -060024namespace keymaster {
25
Shawn Willdena278f612014-12-23 11:22:21 -070026/* static */
27template <> KeyFactoryRegistry* KeyFactoryRegistry::instance_ptr = 0;
Shawn Willden437fbd12014-08-20 11:59:49 -060028
Shawn Willden13fbe3e2015-05-23 03:36:30 +000029Key::Key(const KeyBlob& blob) {
30 authorizations_.push_back(blob.unenforced());
31 authorizations_.push_back(blob.enforced());
Shawn Willdend67afae2014-08-19 12:36:27 -060032}
Shawn Willden13fbe3e2015-05-23 03:36:30 +000033
Shawn Willdend67afae2014-08-19 12:36:27 -060034} // namespace keymaster