projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix weight comparison in edge BFS
[tinc]
/
src
/
gcrypt
/
rsagen.c
diff --git
a/src/gcrypt/rsagen.c
b/src/gcrypt/rsagen.c
index
8576555
..
3469c33
100644
(file)
--- a/
src/gcrypt/rsagen.c
+++ b/
src/gcrypt/rsagen.c
@@
-22,18
+22,13
@@
#include <gcrypt.h>
#include <assert.h>
#include <gcrypt.h>
#include <assert.h>
+#include "asn1.h"
#include "rsa.h"
#include "pem.h"
#include "../rsagen.h"
#include "../xalloc.h"
#include "../utils.h"
#include "rsa.h"
#include "pem.h"
#include "../rsagen.h"
#include "../xalloc.h"
#include "../utils.h"
-// ASN.1 tags.
-typedef enum {
- TAG_INTEGER = 2,
- TAG_SEQUENCE = 16,
-} asn1_tag_t;
-
static size_t der_tag_len(size_t n) {
if(n < 128) {
return 2;
static size_t der_tag_len(size_t n) {
if(n < 128) {
return 2;
@@
-302,7
+297,7
@@
rsa_t *rsa_generate(size_t bits, unsigned long exponent) {
return NULL;
}
return NULL;
}
- rsa_t *rsa =
xzalloc(sizeof(*rsa)
);
+ rsa_t *rsa =
rsa_new(
);
rsa->n = find_mpi(s_rsa, "n");
rsa->e = find_mpi(s_rsa, "e");
rsa->n = find_mpi(s_rsa, "n");
rsa->e = find_mpi(s_rsa, "e");