-// Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
}
}
+std::string
+CryptoLink::getVersion() {
+ return (Botan::version_string());
+}
+
} // namespace cryptolink
} // namespace isc
-// Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
///
static void initialize();
+ /// \brief Get version string
+ static std::string getVersion();
+
/// \brief Factory function for Hash objects
///
/// CryptoLink objects cannot be constructed directly. This
-// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
#include <cryptolink/crypto_hash.h>
#include <cryptolink/crypto_hmac.h>
+#include <openssl/crypto.h>
+
namespace isc {
namespace cryptolink {
}
}
+std::string
+CryptoLink::getVersion() {
+ return (SSLeay_version(SSLEAY_VERSION));
+}
+
} // namespace cryptolink
} // namespace isc
-// Copyright (C) 2011, 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011, 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
using namespace isc::cryptolink;
+// Test get version
+TEST(CryptoLinkTest, Version) {
+ EXPECT_NO_THROW(CryptoLink::getVersion());
+}
+
// Tests whether getCryptoLink() returns a singleton instance
TEST(CryptoLinkTest, Singleton) {
const CryptoLink& c1 = CryptoLink::getCryptoLink();