--- Begin Message ---
Not found .pre3 yet. So not shure what you did with OPENSSL_VER....

So for the VERSION_NUMBER:

opteron# find /usr/include -type f | xargs grep -n OPENSSL_VERSION_NUMBER
/usr/include/openssl/opensslv.h:28:
    #define OPENSSL_VERSION_NUMBER      0x0090704fL

But "problems" start because parm 7 of HMAC in SSL is 'unsigned int' and not
size_t. And on amd64 size_t is 'unsigned long' on 32bit is is 'unsigned int'

So I suggest:
#if  defined(USE_OPENSSL) || defined(USE_PKCS)
-    size_t             buf_len = sizeof(buf);
+    unsigned int    buf_len = sizeof(buf);
 #endif


The same for EVP_DigestFinal{,_ex} parm 3, which is also 'unsigned int *s'
[ Aaahhhaaa, I see the are using (SSLeay() < 0x907000) but that is not compile
time. So compiler errors stay. ]

So I suggest changing the last parameter from sc_hash into u_int...
int
 sc_hash(const oid * hashtype, size_t hashtypelen, u_char * buf,
-        size_t buf_len, u_char * MAC, size_t * MAC_len)
+        size_t buf_len, u_char * MAC, u_int * MAC_len)

Which should make that it soes not depend on any SSL_VERSION...
Unless there are platforms where parm3 of EVP_DigestFinal* is size_t :((

Patch attached....

Question:
    How/where do I add global compile parameters???
    I'd like to add -pipe and for more testing -Wall

--WjW

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "Willem Jan Withagen" <[EMAIL PROTECTED]>
Sent: Saturday, July 03, 2004 11:35 PM
Subject: Re: Re: anybody using net-snmp on FreeBSD/AMD64 ( or other 64bit
platforms??)


> Willem,
> Thank you for your quick reply.
> I'm building 5.1.2.pre2 without changes on
>  FreeBSD 4.9-RELEASE and FreeBSD 5.2.1-RELEASE
>
> TO support the version you use, would you look at snmplib/scapi.c ?
> Look at how OPENSSL_VERSION_NUMBER is used, and please provide a patch
> that works for you.
>
> Thank you,
> -Mike Slifcak
>
>
> >
> > From: "Willem Jan Withagen" <[EMAIL PROTECTED]>
> > Date: 2004/07/03 Sat AM 10:22:35 EDT
> > To: "Michael J. Slifcak" <[EMAIL PROTECTED]>
> > Subject: Re: anybody using net-snmp on FreeBSD/AMD64 ( or other 64bit
platforms??)
> >
> > Mike,
> >
> > OpenSSL is now native with FreeBSD, instead of a package....
> >
> > opteron# openssl version
> > OpenSSL 0.9.7d 17 Mar 2004
> >
> > --WjW
> >
> > ----- Original Message ----- 
> > From: "Michael J. Slifcak" <[EMAIL PROTECTED]>
> > To: "Willem Jan Withagen" <[EMAIL PROTECTED]>
> > Sent: Saturday, July 03, 2004 4:14 AM
> > Subject: Re: anybody using net-snmp on FreeBSD/AMD64 ( or other 64bit
> > platforms??)
> >
> >
> > > Willem Jan Withagen wrote:
> > > >>I've attached the patch that Willem sent me this morning.
> > > >>I'm cherry-picking them in my comments below. Ah Life!
> > > >>Here are a few comments that I have to start the clock:
> > > >>  7. Regarding the snmplib/scapi.c patch, does this match the version
> > > >>     of OpenSSL you are using ?
> > > >
> > > >
> > > > # find /usr/include -type f | xargs grep -n EVP_DigestFinal_ex
> > > > /usr/include/openssl/evp.h:524:int      EVP_DigestFinal_ex(EVP_MD_CTX
> > > > *ctx,unsigned char *md,unsigned int *s);
> > > >
> > > > Which looks like the parameters need to be references.....
> > > > As they are passed in the function header. However the compiler was
> > complaining
> > > > and this shut it up. But now I think it was more complaining about the
> > > > difference between (size_t*) <> (unsigned int*)
> > > > Which would require a change in the parameters of sc_hash, or do an
implicit
> > > > conversion....
> > > >
> > > > --WjW
> > > >
> > > >
> > >
> > >
> > > Willem, I did not see the OpenSSL version number in your reply.
> > > Can you kindly run pkg_info and let me know which version you are using?
> > > Without the version number, we cannot apply a patch that is specific
> > > to your platform, but would break other platforms.
> > >
> > > Thank you for your assistance,
> > > -Mike Slifcak
> > >
> > >
> > >
> >
> >
>
>



--- End Message ---

Reply via email to