Back to index

nagios-nrpe  2.13
dh.h
Go to the documentation of this file.
00001 #ifndef HEADER_DH_H
00002 #include <openssl/dh.h>
00003 #endif
00004 DH *get_dh512()
00005        {
00006        static unsigned char dh512_p[]={
00007               0xA4,0x56,0x47,0x7F,0x90,0xF0,0xDE,0xFE,0x73,0x1A,0xBD,0x3E,
00008               0xA9,0xF5,0x69,0x46,0x29,0x0B,0x47,0x55,0x8C,0xE8,0xF3,0xDF,
00009               0xF6,0x1B,0xC5,0x29,0x1B,0x81,0x97,0x3E,0xE4,0xD9,0xC8,0x2B,
00010               0xBB,0x2B,0x7A,0x37,0xE1,0x18,0xDF,0xEC,0x6B,0xEC,0x04,0x77,
00011               0x6D,0x51,0x3C,0x7C,0xB7,0x81,0xBD,0x7F,0xC9,0x5A,0x04,0xB4,
00012               0xA4,0x3E,0x8B,0x5B,
00013               };
00014        static unsigned char dh512_g[]={
00015               0x02,
00016               };
00017        DH *dh;
00018 
00019        if ((dh=DH_new()) == NULL) return(NULL);
00020        dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL);
00021        dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL);
00022        if ((dh->p == NULL) || (dh->g == NULL))
00023               { DH_free(dh); return(NULL); }
00024        return(dh);
00025        }