mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
- Fix memleak in testcode for testbound (if it fails).
- Fix NSS returned arrays out of setup function to be statics. git-svn-id: file:///svn/unbound/trunk@2930 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
e01a5ea199
commit
021f32ebf9
@ -1,3 +1,7 @@
|
||||
29 Jun 2013: Wouter
|
||||
- Fix memleak in testcode for testbound (if it fails).
|
||||
- Fix NSS returned arrays out of setup function to be statics.
|
||||
|
||||
26 Jun 2013: Wouter
|
||||
- max include of 100.000 files (depth and globbed at one time).
|
||||
This is to preserve system memory in bug cases, or endless cases.
|
||||
|
@ -909,8 +909,10 @@ outside_network_create(struct comm_base* base, size_t bufsize,
|
||||
runtime->infra = infra;
|
||||
outnet->base = base;
|
||||
outnet->udp_buff = ldns_buffer_new(bufsize);
|
||||
if(!outnet->udp_buff)
|
||||
if(!outnet->udp_buff) {
|
||||
free(outnet);
|
||||
return NULL;
|
||||
}
|
||||
return outnet;
|
||||
}
|
||||
|
||||
|
@ -669,12 +669,12 @@ static SECKEYPublicKey* nss_buf2ecdsa(unsigned char* key, size_t len, int algo)
|
||||
SECKEYPublicKey* pk;
|
||||
SECItem pub = {siBuffer, NULL, 0};
|
||||
SECItem params = {siBuffer, NULL, 0};
|
||||
unsigned char param256[] = {
|
||||
static unsigned char param256[] = {
|
||||
/* OBJECTIDENTIFIER 1.2.840.10045.3.1.7 (P-256)
|
||||
* {iso(1) member-body(2) us(840) ansi-x962(10045) curves(3) prime(1) prime256v1(7)} */
|
||||
0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07
|
||||
};
|
||||
unsigned char param384[] = {
|
||||
static unsigned char param384[] = {
|
||||
/* OBJECTIDENTIFIER 1.3.132.0.34 (P-384)
|
||||
* {iso(1) identified-organization(3) certicom(132) curve(0) ansip384r1(34)} */
|
||||
0x06, 0x05, 0x2b, 0x81, 0x04, 0x00, 0x22
|
||||
@ -845,19 +845,19 @@ nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype,
|
||||
/* uses libNSS */
|
||||
|
||||
/* hash prefix for md5, RFC2537 */
|
||||
unsigned char p_md5[] = {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a,
|
||||
static unsigned char p_md5[] = {0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a,
|
||||
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10};
|
||||
/* hash prefix to prepend to hash output, from RFC3110 */
|
||||
unsigned char p_sha1[] = {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B,
|
||||
static unsigned char p_sha1[] = {0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B,
|
||||
0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14};
|
||||
/* from RFC5702 */
|
||||
unsigned char p_sha256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
static unsigned char p_sha256[] = {0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x05, 0x00, 0x04, 0x20};
|
||||
unsigned char p_sha512[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
static unsigned char p_sha512[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40};
|
||||
/* from RFC6234 */
|
||||
/* for future RSASHA384 ..
|
||||
unsigned char p_sha384[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
static unsigned char p_sha384[] = {0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60,
|
||||
0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30};
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user