Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove themis_version() API #388

Merged
merged 5 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions src/soter/boringssl/soter.c

This file was deleted.

31 changes: 0 additions & 31 deletions src/soter/openssl/soter.c

This file was deleted.

9 changes: 0 additions & 9 deletions src/soter/soter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* @{
*/

#define SOTER_VERSION_TEXT "soter 0.9: "

#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
Expand All @@ -47,12 +45,5 @@
#include <soter/soter_asym_sign.h>
#include <soter/soter_kdf.h>

/**
* @brief get version string of soter
*
* @return version string
*
*/
const char* soter_version(void);
/**@}*/
#endif /* SOTER_H */
29 changes: 0 additions & 29 deletions src/themis/themis.c

This file was deleted.

4 changes: 0 additions & 4 deletions src/themis/themis.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@
* @{
*/

#define THEMIS_VERSION_TEXT "themis 0.9: "

#include <themis/themis_error.h>
#include <themis/secure_message.h>
#include <themis/secure_cell.h>
#include <themis/secure_session.h>
#include <themis/secure_comparator.h>

const char* themis_version(void);

/** @} */
#endif /* THEMIS_H */

Expand Down
1 change: 0 additions & 1 deletion src/wrappers/themis/ruby/lib/rubythemis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class CallbacksStruct < FFI::Struct
[:pointer, :pointer, :pointer, :pointer], :int
attach_function :themis_gen_ec_key_pair,
[:pointer, :pointer, :pointer, :pointer], :int
attach_function :themis_version, [], :string

attach_function :themis_secure_cell_encrypt_seal,
[:pointer, :int, :pointer, :int, :pointer, :int,
Expand Down
24 changes: 16 additions & 8 deletions src/wrappers/themis/rust/libthemis-sys/tests/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::ffi::CStr;
use std::ptr;

#[test]
fn check_version() {
let version = unsafe { CStr::from_ptr(libthemis_sys::themis_version()) };
// Themis 0.10.0 is slightly buggy and identifies itself as 0.9.
assert!(version
.to_str()
.expect("valid UTF-8")
.contains("themis 0.9"));
fn check_ffi_call() {
let mut private_key_len = 0;
let mut public_key_len = 0;
let status = unsafe {
libthemis_sys::themis_gen_ec_key_pair(
ptr::null_mut(),
&mut private_key_len,
ptr::null_mut(),
&mut public_key_len,
)
};
assert_eq!(
status,
libthemis_sys::THEMIS_BUFFER_TOO_SMALL as libthemis_sys::themis_status_t
);
}
1 change: 0 additions & 1 deletion tests/themis/themis_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ int main(int argc, char* argv[])
{
UNUSED(argc);
UNUSED(argv);
printf("%s\n", themis_version());
testsuite_start_testing();

run_secure_message_test();
Expand Down