Skip to content

Commit

Permalink
Create generate_rsa_keys.c
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Edwards <joed6834@colorado.edu>
  • Loading branch information
bearycool11 authored Nov 12, 2024
1 parent d1110a5 commit 8d3a040
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions generate_rsa_keys.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <openssl/rsa.h>
#include <openssl/err.h>

// Declare the generate_rsa_keys function
RSA* generate_rsa_keys() {
RSA* rsa = RSA_new();
BIGNUM* exponent = BN_new();
BN_set_word(exponent, 65537);
RSA_generate_key_ex(rsa, 2048, exponent, NULL);
BN_free(exponent);
return rsa;
}

void* pml_logic_loop(void* pml) {
// ...
}

int check_flags(PMLL* pml) {
// ...
return 1; // Add a return statement
}

// ...

0 comments on commit 8d3a040

Please sign in to comment.