Skip Menu |
 

This queue is for tickets about the Net-SSLeay CPAN distribution.

Report information
The Basics
Id: 74557
Status: resolved
Priority: 0/
Queue: Net-SSLeay

People
Owner: MIKEM [...] cpan.org
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Proposal for adding more hash/digest functions
Hi,

my proposal is to replace:

- #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
- #ifndef OPENSSL_NO_SHA256
-
- const EVP_MD *EVP_sha256()
-
- #endif
- #endif

with the following code:

#ifndef OPENSSL_NO_MD5

const EVP_MD *EVP_md5()

#endif
#ifndef OPENSSL_NO_SHA

const EVP_MD *EVP_sha()

const EVP_MD *EVP_sha1()

#endif
#if !defined(OPENSSL_NO_SHA256) && OPENSSL_VERSION_NUMBER >= 0x0090800fL

const EVP_MD *EVP_sha224()

const EVP_MD *EVP_sha256()

#endif
#if !defined(OPENSSL_NO_SHA512) && OPENSSL_VERSION_NUMBER >= 0x0090800fL

const EVP_MD *EVP_sha384()

const EVP_MD *EVP_sha512()

#endif
#ifndef OPENSSL_NO_RIPEMD

const EVP_MD *EVP_ripemd160()

#endif
#if !defined(OPENSSL_NO_WHIRLPOOL) && OPENSSL_VERSION_NUMBER >= 0x10000000L

const EVP_MD *EVP_whirlpool()

#endif


I am not sure if some other functions might also be good for something/someone
EVP_MD *EVP_md_null(void);
EVP_MD *EVP_md2(void);
EVP_MD *EVP_md4(void);
EVP_MD *EVP_dss(void);
EVP_MD *EVP_dss1(void);
EVP_MD *EVP_ecdsa(void);
EVP_MD *EVP_mdc2(void);
to me these are too exotic and not frequently used but you might have another view.

--
kmx
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 01 Feb 2012 08:59:21 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Download (untitled) / with headers
text/plain 2.2k
Hello, Your proposal seems reasonable Cheers. On Tuesday, January 31, 2012 05:07:15 AM you wrote: Show quoted text
> Tue Jan 31 05:07:14 2012: Request 74557 was acted upon. > Transaction: Ticket created by KMX > Queue: Net-SSLeay > Subject: Proposal for adding more hash/digest functions > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: kmx@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74557 > > > > Hi, > > my proposal is to replace: > > - #if OPENSSL_VERSION_NUMBER >= 0x0090800fL > - #ifndef OPENSSL_NO_SHA256 > - > - const EVP_MD *EVP_sha256() > - > - #endif > - #endif > > with the following code: > > #ifndef OPENSSL_NO_MD5 > > const EVP_MD *EVP_md5() > > #endif > #ifndef OPENSSL_NO_SHA > > const EVP_MD *EVP_sha() > > const EVP_MD *EVP_sha1() > > #endif > #if !defined(OPENSSL_NO_SHA256) && OPENSSL_VERSION_NUMBER >= 0x0090800fL > > const EVP_MD *EVP_sha224() > > const EVP_MD *EVP_sha256() > > #endif > #if !defined(OPENSSL_NO_SHA512) && OPENSSL_VERSION_NUMBER >= 0x0090800fL > > const EVP_MD *EVP_sha384() > > const EVP_MD *EVP_sha512() > > #endif > #ifndef OPENSSL_NO_RIPEMD > > const EVP_MD *EVP_ripemd160() > > #endif > #if !defined(OPENSSL_NO_WHIRLPOOL) && OPENSSL_VERSION_NUMBER >= 0x10000000L > > const EVP_MD *EVP_whirlpool() > > #endif > > > I am not sure if some other functions might also be good for > something/someone EVP_MD *EVP_md_null(void); > EVP_MD *EVP_md2(void); > EVP_MD *EVP_md4(void); > EVP_MD *EVP_dss(void); > EVP_MD *EVP_dss1(void); > EVP_MD *EVP_ecdsa(void); > EVP_MD *EVP_mdc2(void); > to me these are too exotic and not frequently used but you might have > another view. > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Fri, 03 Feb 2012 20:47:55 +0100
To: bug-Net-SSLeay [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 177b
Show quoted text
> Your proposal seems reasonable >
Well, I have a better one :) Let us just add this one function: const EVP_MD * EVP_get_digestbyname(name) const char *name -- kmx
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Sat, 04 Feb 2012 08:03:59 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Download (untitled) / with headers
text/plain 981b
Hi On Friday, February 03, 2012 02:48:08 PM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74557 > >
> > Your proposal seems reasonable
> > Well, I have a better one :) > > Let us just add this one function: > > const EVP_MD * > EVP_get_digestbyname(name) > const char *name
Yes, thats even better. Cheers. Show quoted text
> > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Tue, 07 Feb 2012 11:40:53 +0100
To: bug-Net-SSLeay [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Summary of the current situation concerning digest functions in Net::SSLeay 1/ We have these functions directly calculating a digest: MD2(data) MD4(data) MD5(data) RIPEMD160(data) 2/ We have the following 2 functions related to EVP_MD structure: EVP_add_digest(EVP_MD *digest) const EVP_MD *EVP_sha256() My proposal: A/ Add the following new functions to group "1/" (just to cover mostly used digest functions) +SHA1(data) +SHA256(data) +SHA512(data) B/ Add the following new functions to group "2/" + EVP_get_digestbyname(name) + OpenSSL_add_all_digests C/ maybe also add a support for generic interface + EVP_MD_CTX_create() + EVP_MD_CTX_init(ctx) + EVP_DigestInit(ctx,type) + EVP_DigestInit_ex(ctx,type,impl) + EVP_DigestUpdate(ctx,d,cnt) + EVP_DigestFinal(ctx,md,s) + EVP_DigestFinal_ex(ctx,md,s) + EVP_MD_CTX_cleanup(ctx) + EVP_MD_CTX_destroy(ctx) Not sure if you will agree with all the new functions, for me personally it is absolutely crucial to have EVP_get_digestbyname (which was the reason why I have started this RT) the rest is just about having digest support to certain extent complete -- kmx
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 08 Feb 2012 09:38:26 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Hi, Yes, Im OK with all those, provided they are implemented in a backwards compatible and portable way, with documentation and preferably tests. Cheers. On Tuesday, February 07, 2012 05:41:06 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74557 > > > Summary of the current situation concerning digest functions in Net::SSLeay > > 1/ We have these functions directly calculating a digest: > MD2(data) > MD4(data) > MD5(data) > RIPEMD160(data) > > 2/ We have the following 2 functions related to EVP_MD structure: > EVP_add_digest(EVP_MD *digest) > const EVP_MD *EVP_sha256() > > My proposal: > > A/ Add the following new functions to group "1/" (just to cover mostly > used digest functions) > +SHA1(data) > +SHA256(data) > +SHA512(data) > > B/ Add the following new functions to group "2/" > + EVP_get_digestbyname(name) > + OpenSSL_add_all_digests > > C/ maybe also add a support for generic interface > + EVP_MD_CTX_create() > + EVP_MD_CTX_init(ctx) > + EVP_DigestInit(ctx,type) > + EVP_DigestInit_ex(ctx,type,impl) > + EVP_DigestUpdate(ctx,d,cnt) > + EVP_DigestFinal(ctx,md,s) > + EVP_DigestFinal_ex(ctx,md,s) > + EVP_MD_CTX_cleanup(ctx) > + EVP_MD_CTX_destroy(ctx) > > > Not sure if you will agree with all the new functions, for me personally > it is absolutely crucial to have EVP_get_digestbyname (which was the > reason why I have started this RT) the rest is just about having digest > support to certain extent complete > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 08 Feb 2012 03:30:00 +0100
To: bug-Net-SSLeay [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 840b
In the end I have added: - Net::SSLeay::OpenSSL_add_all_digests - Net::SSLeay::P_EVP_MD_list_all - Net::SSLeay::EVP_get_digestbyname - Net::SSLeay::EVP_MD_type - Net::SSLeay::EVP_MD_size - Net::SSLeay::EVP_MD_CTX_md - Net::SSLeay::EVP_MD_CTX_create - Net::SSLeay::EVP_MD_CTX_destroy - Net::SSLeay::EVP_DigestInit - Net::SSLeay::EVP_DigestInit_ex - Net::SSLeay::EVP_DigestUpdate - Net::SSLeay::EVP_DigestFinal - Net::SSLeay::EVP_DigestFinal_ex - Net::SSLeay::EVP_Digest - Net::SSLeay::SHA1 - Net::SSLeay::SHA256 - Net::SSLeay::SHA512 - Net::SSLeay::EVP_sha1 - Net::SSLeay::EVP_sha512 A have prepared code + doc + tests + doc for already existing digest related functions. See digest-enhancements-v1_r293.diff + t\data\binary-test.file -- kmx

Message body is not shown because sender requested not to inline it.

Download binary-test.file
application/octet-stream 4.8k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 08 Feb 2012 17:12:01 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Download (untitled) / with headers
text/plain 1.6k
Hi, Tests OK. Committed at 295. Thanks again for your contributions. Cheers. On Tuesday, February 07, 2012 09:30:23 PM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74557 > > > In the end I have added: > - Net::SSLeay::OpenSSL_add_all_digests > - Net::SSLeay::P_EVP_MD_list_all > - Net::SSLeay::EVP_get_digestbyname > - Net::SSLeay::EVP_MD_type > - Net::SSLeay::EVP_MD_size > - Net::SSLeay::EVP_MD_CTX_md > - Net::SSLeay::EVP_MD_CTX_create > - Net::SSLeay::EVP_MD_CTX_destroy > - Net::SSLeay::EVP_DigestInit > - Net::SSLeay::EVP_DigestInit_ex > - Net::SSLeay::EVP_DigestUpdate > - Net::SSLeay::EVP_DigestFinal > - Net::SSLeay::EVP_DigestFinal_ex > - Net::SSLeay::EVP_Digest > - Net::SSLeay::SHA1 > - Net::SSLeay::SHA256 > - Net::SSLeay::SHA512 > - Net::SSLeay::EVP_sha1 > - Net::SSLeay::EVP_sha512 > > A have prepared code + doc + tests + doc for already existing digest > related functions. > > See digest-enhancements-v1_r293.diff + t\data\binary-test.file > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 08 Feb 2012 08:21:10 +0100
To: bug-Net-SSLeay [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Please do not forget to commit: t\data\binary-test.file -- kmx
Subject: Re: [rt.cpan.org #74557] Proposal for adding more hash/digest functions
Date: Wed, 08 Feb 2012 17:26:55 +1000
To: bug-Net-SSLeay [...] rt.cpan.org
From: Mike McCauley <mikem [...] open.com.au>
Download (untitled) / with headers
text/plain 876b
Hi, Oops again. Added and committed. Cheers. On Wednesday, February 08, 2012 02:21:21 AM you wrote: Show quoted text
> Queue: Net-SSLeay > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74557 > > > Please do not forget to commit: > > t\data\binary-test.file > > -- > kmx
-- Mike McCauley mikem@open.com.au Open System Consultants Pty. Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au Phone +61 7 5598-7474 Fax +61 7 5598-7070 Radiator: the most portable, flexible and configurable RADIUS server anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS, TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP, DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.