diff options
author | Jack Lloyd <[email protected]> | 2017-11-14 09:21:33 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-11-14 16:19:44 -0500 |
commit | c71af3e2cf78db668eec1ea039cfb7f92eefdc72 (patch) | |
tree | 749929e04fb7ef5a3ec398dc053726be895e1bea /src/lib/ffi | |
parent | 69886de61e73c5a5d507c660281124db84bede62 (diff) |
Avoid deprecated functions in FFI
Diffstat (limited to 'src/lib/ffi')
-rw-r--r-- | src/lib/ffi/ffi_cert.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ffi/ffi_cert.cpp b/src/lib/ffi/ffi_cert.cpp index 2ac9c69af..17b78cc7c 100644 --- a/src/lib/ffi/ffi_cert.cpp +++ b/src/lib/ffi/ffi_cert.cpp @@ -55,7 +55,7 @@ int botan_x509_cert_get_public_key(botan_x509_cert_t cert, botan_pubkey_t* key) *key = nullptr; #if defined(BOTAN_HAS_RSA) - std::unique_ptr<Botan::Public_Key> publicKey(safe_get(cert).subject_public_key()); + std::unique_ptr<Botan::Public_Key> publicKey = safe_get(cert).load_subject_public_key(); *key = new botan_pubkey_struct(publicKey.release()); return BOTAN_FFI_SUCCESS; #else @@ -100,12 +100,12 @@ int botan_x509_cert_destroy(botan_x509_cert_t cert) int botan_x509_cert_get_time_starts(botan_x509_cert_t cert, char out[], size_t* out_len) { - return BOTAN_FFI_DO(Botan::X509_Certificate, cert, c, { return write_str_output(out, out_len, c.start_time()); }); + return BOTAN_FFI_DO(Botan::X509_Certificate, cert, c, { return write_str_output(out, out_len, c.not_before().to_string()); }); } int botan_x509_cert_get_time_expires(botan_x509_cert_t cert, char out[], size_t* out_len) { - return BOTAN_FFI_DO(Botan::X509_Certificate, cert, c, { return write_str_output(out, out_len, c.end_time()); }); + return BOTAN_FFI_DO(Botan::X509_Certificate, cert, c, { return write_str_output(out, out_len, c.not_after().to_string()); }); } int botan_x509_cert_get_serial_number(botan_x509_cert_t cert, uint8_t out[], size_t* out_len) |