aboutsummaryrefslogtreecommitdiff
path: root/src/axolotl.cpp
diff options
context:
space:
mode:
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;