[sqlite] Can i store DER encoded Certificate data in sqlite

2007-04-12 Thread samrat saha
Dear All,
I am trying to store certificate related DER encoded data using sqlite 
database??
But what kind of datatype should i use in sqlite to store and retrive DER 
encoded data??

Is there anyway to store the DER encoded certificate related fileds in sqlite??


Thanks in advance..
Samrat


- Original Message 
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: SQLite <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2007 5:12:51 PM
Subject: [sqlite] Re: Encoding confusion

Anders Persson <[EMAIL PROTECTED]> wrote:
> What is confusing me is how are the string stored,
> if i understand corrent it is UTF-8 is this done automatic
> and what coding is a get back when a extra data ?

SQLite database may store string data in UTF-8, UTF-16le or UTF-16be 
encodings. The encoding is determined when the first table in the 
database is created, and cannot be changed afterwards. See "PRAGMA 
encoding" at

http://sqlite.org/pragma.html

When you extract the data, it is automatically converted, if necessary, 
to UTF-8 or UTF-16 depending on whether you use sqlite3_column_text or 
sqlite3_column_text16.

Igor Tandetnik 


-
To unsubscribe, send email to [EMAIL PROTECTED]
-








   

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

Re: [sqlite] Can i store DER encoded Certificate data in sqlite

2007-04-13 Thread samrat saha
When i am trying to print the der encoded certificate subject in gdb it shows 
like the following string.. 
Taken from nss code:=

data is unsigned char * type
(gdb) p derSubject->data
0\0261\0240\022\006\003U\004\003\023\vSamrat saha

Now how to store this kinf of info into database as binary and how to retrive 
it back??


Samrat

- Original Message 
From: Michael Schlenker <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Friday, April 13, 2007 1:18:13 PM
Subject: Re: [sqlite] Can i store DER encoded Certificate data in sqlite

samrat saha schrieb:
> Dear All,
> I am trying to store certificate related DER encoded data using sqlite 
> database??
> But what kind of datatype should i use in sqlite to store and retrive DER 
> encoded data??
> 
> Is there anyway to store the DER encoded certificate related fileds in 
> sqlite??
> 
ASN.1 DER encoding is binary data, so use a BLOB.

Michael


-- 
Michael Schlenker
Software Engineer

CONTACT Software GmbH   Tel.:   +49 (421) 20153-80
Wiener Straße 1-3   Fax:+49 (421) 20153-41
28359 Bremen
http://www.contact.de/  E-Mail: [EMAIL PROTECTED]

Sitz der Gesellschaft: Bremen | Geschäftsführer: Karl Heinz Zachries
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215

-
To unsubscribe, send email to [EMAIL PROTECTED]
-







__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com