Skip to content

Fix warning when using key parameter of kmip_bio_register_symmetric_key #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion kmippp/kmippp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ context::id_t context::op_register(context::name_t name, name_t group, key_t key

int id_max_len = 64;
char* idp = nullptr;
int result = kmip_bio_register_symmetric_key(bio_, &ta, reinterpret_cast<char*>(key.data()), key.size(), &idp, &id_max_len);
int result = kmip_bio_register_symmetric_key(bio_, &ta, key.data(), key.size(), &idp, &id_max_len);

std::string ret;
if(idp != nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion kmippp/kmippp.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace kmippp {
class context {
public:

using key_t = std::vector<unsigned char>;
using key_t = std::vector<uint8_t>;
using id_t = std::string;
using ids_t = std::vector<std::string>;
using name_t = std::string;
Expand Down
2 changes: 1 addition & 1 deletion libkmip/include/kmip_bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ OpenSSH BIO API
*/

int kmip_bio_create_symmetric_key(BIO *, TemplateAttribute *, char **, int *);
int kmip_bio_register_symmetric_key(BIO *, TemplateAttribute *, char*, int, char **, int *);
int kmip_bio_register_symmetric_key(BIO *, TemplateAttribute *, uint8_t*, int, char **, int *);
int kmip_bio_get_symmetric_key(BIO *, char *, int, char **, int *);
int kmip_bio_get_name_attribute(BIO *, char *, int, char **, int *);
int kmip_bio_destroy_symmetric_key(BIO *, char *, int);
Expand Down
2 changes: 1 addition & 1 deletion libkmip/src/kmip_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int kmip_bio_create_symmetric_key(BIO *bio,

int kmip_bio_register_symmetric_key(BIO *bio,
TemplateAttribute *template_attribute,
char* key, int key_len,
uint8* key, int key_len,
char **id, int *id_size)
{
if(bio == NULL || template_attribute == NULL || id == NULL || id_size == NULL || key == NULL || key_len == 0)
Expand Down