aboutsummaryrefslogtreecommitdiff
path: root/src/axolotl.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-22 17:50:56 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-22 17:50:56 +0100
commit043bc43716764719cd124c79155f73c359abd5b9 (patch)
tree7a1a6f0ece78015498e991ec312404555f8782b9 /src/axolotl.cpp
parent492dc1ab5875af5b6a1fb7039dd5262e55eb48eb (diff)
Copyright Notices
Diffstat (limited to 'src/axolotl.cpp')
-rw-r--r--src/axolotl.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/axolotl.cpp b/src/axolotl.cpp
index f03a01c..2586204 100644
--- a/src/axolotl.cpp
+++ b/src/axolotl.cpp
@@ -1,3 +1,17 @@
+/* Copyright 2015 OpenMarket Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include "axolotl/axolotl.hh"
#include "axolotl/session.hh"
#include "axolotl/account.hh"
@@ -349,7 +363,7 @@ size_t axolotl_account_identity_keys(
AxolotlAccount * account,
void * identity_keys, size_t identity_key_length
) {
- std::size_t length = OUTPUT_KEY_LENGTH * 2 + 1;
+ std::size_t length = axolotl_account_identity_keys_length(account);
if (identity_key_length < length) {
from_c(account)->last_error =
axolotl::ErrorCode::OUTPUT_BUFFER_TOO_SMALL;