mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Use xs_evp_sign() for signing.
This commit is contained in:
parent
e3cea55770
commit
acb4bcd80f
1 changed files with 4 additions and 4 deletions
8
http.c
8
http.c
|
@ -10,9 +10,9 @@
|
||||||
#include "snac.h"
|
#include "snac.h"
|
||||||
|
|
||||||
d_char *http_signed_request(snac *snac, char *method, char *url,
|
d_char *http_signed_request(snac *snac, char *method, char *url,
|
||||||
d_char *headers,
|
d_char *headers,
|
||||||
d_char *body, int b_size,
|
d_char *body, int b_size,
|
||||||
int *status, d_char **payload, int *p_size)
|
int *status, d_char **payload, int *p_size)
|
||||||
/* does a signed HTTP request */
|
/* does a signed HTTP request */
|
||||||
{
|
{
|
||||||
xs *l1;
|
xs *l1;
|
||||||
|
@ -65,7 +65,7 @@ d_char *http_signed_request(snac *snac, char *method, char *url,
|
||||||
strcmp(method, "POST") == 0 ? "post" : "get",
|
strcmp(method, "POST") == 0 ? "post" : "get",
|
||||||
target, host, digest, date);
|
target, host, digest, date);
|
||||||
|
|
||||||
s64 = xs_rsa_sign(seckey, s, strlen(s));
|
s64 = xs_evp_sign(seckey, s, strlen(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* build now the signature header */
|
/* build now the signature header */
|
||||||
|
|
Loading…
Reference in a new issue