Issue with RSA function calls from the Ubuntu package libhogweed5
From the package manager, I installed the Nettle libraries libnettle7, libhogweed5, nettle-bin, and nettle-dev, which appear to be based on Nettle 3.5.1. I am using Ubuntu 20.04. After this, I was able to write two programs using AES and SHA algorithms, which worked fine, so I know that the header pathing is correct.
However, I could not call RSA functions without getting compiler errors.
$ make rsa_test
/usr/bin/ld: /tmp/ccaqGeCe.o: in function `main':
rsa_test.
/usr/bin/ld: rsa_test.
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: rsa_test] Error 1
Here is minimal code that produces the error:
#include <stdlib.h>
#include <stdio.h>
#include <nettle/rsa.h>
using namespace std;
int main(int argc, char **argv) {
struct rsa_public_key pub;
struct rsa_private_key priv;
rsa_public_
rsa_private_
}
The file rsa.h is present in /usr/include/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu nettle Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Christopher Coppola
- Solved:
- Last query:
- Last reply: