how to save binary values in MySQL radreply table
Hi, My apologies if this has been answered before but I didn't see anything. This is basically a MySQL question. I need to save MS-MPPE attributes in the radreply table. Those have a binary value. According to the schema, Value is a varchar(253). Can I just copy the binary value to a string and send that to the MySQL API, or do I need to transalate it to ASCII first? Thanks, Dave - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: how to save binary values in MySQL radreply table
Dave Mason [EMAIL PROTECTED] wrote: My apologies if this has been answered before but I didn't see anything. This is basically a MySQL question. I need to save MS-MPPE attributes in the radreply table. Those have a binary value. Which is why they're of type octets in the dictionary. When the server prints them out, it prints them as a series of hex characters, which is in turn a normal ASCII string. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: how to save binary values in MySQL radreply table
True - I need to figure out how to reverse the process. That is, I need to send something like 0xed5e as my attribute value. For now I'll just use VSA as the attribute because it's not encrypted. If I set the value in radreply to ed5e, the server returns 65643565 to the client, as you would expect. I need to get binary values into the table somehow. Maybe the API is smart enough to handle binary data even if the mysql command line client isn't? I tried prefixing each character with \0x but that didnt work. Dave Alan DeKok wrote: Dave Mason [EMAIL PROTECTED] wrote: My apologies if this has been answered before but I didn't see anything. This is basically a MySQL question. I need to save MS-MPPE attributes in the radreply table. Those have a binary value. Which is why they're of type octets in the dictionary. When the server prints them out, it prints them as a series of hex characters, which is in turn a normal ASCII string. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: how to save binary values in MySQL radreply table
Dave, You may want to check out MySQL 4.x - there is a hex() function to return a hexidecimal representation.. gm... - Original Message - From: Dave Mason [EMAIL PROTECTED] To: freeradius mailing list [EMAIL PROTECTED] Sent: Friday, June 25, 2004 2:30 PM Subject: Re: how to save binary values in MySQL radreply table True - I need to figure out how to reverse the process. That is, I need to send something like 0xed5e as my attribute value. For now I'll just use VSA as the attribute because it's not encrypted. If I set the value in radreply to ed5e, the server returns 65643565 to the client, as you would expect. I need to get binary values into the table somehow. Maybe the API is smart enough to handle binary data even if the mysql command line client isn't? I tried prefixing each character with \0x but that didnt work. Dave Alan DeKok wrote: Dave Mason [EMAIL PROTECTED] wrote: My apologies if this has been answered before but I didn't see anything. This is basically a MySQL question. I need to save MS-MPPE attributes in the radreply table. Those have a binary value. Which is why they're of type octets in the dictionary. When the server prints them out, it prints them as a series of hex characters, which is in turn a normal ASCII string. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html --- [This E-mail scanned for viruses by Declude Ant-Virus Scanner] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html