Skip to content

libnpnt not compiling #7

Description

@ds-master

I have referenced this link to clone libnpnt onto my machine.
https://digitalsky.ispirt.in/t/open-source-npnt-implementation/57

When I 'make' the source, I get the following compilation error:

gcc -g -Wall -I../ -I. -I../inc -I/usr/local/opt/openssl/include -DRFL_USE_LIBOPENSSL -c test_ifaces.c -o build/test_ifaces.o
test_ifaces.c: In function ‘extract_public_key_from_xml_artefact’:
test_ifaces.c:211:36: warning: pointer targets in passing argument 2 of ‘mxmlLoadString’ differ in signedness [-Wpointer-sign]
     permart = mxmlLoadString(NULL, buffer, MXML_OPAQUE_CALLBACK);
                                    ^~~~~~
In file included from ../inc/defines.h:22:0,
                 from ../inc/control_iface.h:15,
                 from test_ifaces.c:13:
../mxml/mxml.h:185:21: note: expected ‘const char *’ but argument is of type ‘uint8_t * {aka unsigned char *}’
 extern mxml_node_t *mxmlLoadString(mxml_node_t *top, const char *s,
                     ^~~~~~~~~~~~~~
test_ifaces.c:250:37: error: dereferencing pointer to incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
     if (EVP_PKEY_RSA == permart_pkey->save_type) {
                                     ^~
test_ifaces.c:225:17: warning: unused variable ‘type’ [-Wunused-variable]
     mxml_type_t type = mxmlGetType(certificate);
                 ^~~~
test_ifaces.c: In function ‘load_artifact’:
test_ifaces.c:291:54: warning: pointer targets in passing argument 3 of ‘base64_encode’ differ in signedness [-Wpointer-sign]
     base64_permart = base64_encode(buffer, file_len, &outlen);
                                                      ^
In file included from test_ifaces.c:21:0:
../inc/npnt_internal.h:35:10: note: expected ‘uint16_t * {aka short unsigned int *}’ but argument is of type ‘int16_t * {aka short int *}’
 uint8_t* base64_encode(const uint8_t *src, uint16_t len, uint16_t *out_len);
          ^~~~~~~~~~~~~
test_ifaces.c:304:28: warning: too many arguments for format [-Wformat-extra-args]
         BIO_printf(outbio, "Artefact Set Successfully!\n", ret);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:48: recipe for target 'build/test_ifaces.o' failed
make: *** [build/test_ifaces.o] Error 1

Does anyone have a fix for it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions