Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
9940aba9
Commit
9940aba9
authored
Apr 23, 2012
by
Giovanni Bajo
Committed by
Simon Kelley
Aug 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial openssl RSASHA1 implementation (only SHA1 for now).
parent
7e846b98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
Makefile
Makefile
+2
-1
src/dnssec-openssl.c
src/dnssec-openssl.c
+45
-0
No files found.
Makefile
View file @
9940aba9
...
...
@@ -67,8 +67,9 @@ version = -DVERSION='\"`$(top)/bld/get-version $(top)`\"'
objs
=
cache.o rfc1035.o util.o option.o forward.o network.o
\
dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o
\
helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o
\
dhcp-common.o
outpacket.o
radv.o
slaac.o
auth.o
ipset.o
\
domain.o dnssec.o
domain.o
dnssec.o
dnssec-openssl.o
hdrs
=
dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h
\
dns-protocol.h radv-protocol.h
...
...
src/dnssec-openssl.c
0 → 100644
View file @
9940aba9
#include <string.h>
#include <openssl/evp.h>
struct
rsasha1_state
{
union
{
EVP_MD_CTX
hash
;
unsigned
char
digest
[
20
];
};
unsigned
char
*
sig
;
unsigned
siglen
;
}
RSASHA1
;
int
rsasha1_set_signature
(
unsigned
char
*
data
,
unsigned
len
)
{
RSASHA1
.
sig
=
data
;
RSASHA1
.
siglen
=
len
;
return
1
;
}
void
rsasha1_begin_data
(
void
)
{
EVP_MD_CTX_init
(
&
RSASHA1
.
hash
);
EVP_DigestInit_ex
(
&
RSASHA1
.
hash
,
EVP_sha1
(),
NULL
);
}
void
rsasha1_add_data
(
void
*
data
,
unsigned
len
)
{
EVP_DigestUpdate
(
&
RSASHA1
.
hash
,
data
,
len
);
}
void
rsasha1_end_data
(
void
)
{
unsigned
char
digest
[
20
];
EVP_DigestFinal
(
&
RSASHA1
.
hash
,
digest
,
NULL
);
memcpy
(
RSASHA1
.
digest
,
digest
,
20
);
}
int
rsasha1_verify
(
unsigned
char
*
key
,
unsigned
key_len
)
{
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment