Hi,
My structure has 3 unsigned char arrays and I will have to move this
encrypted data to other machines too.
Following is the structure:
typedef struct myStruct {
unsigned char id[4];
unsigned char type;
unsigned char Data[128]; } ;
Can you pleas
Charles B Cranston wrote:
Casting does not actually change the data, only the way in which
it is treated by the program.
Casting changes the way data are treated by the compiler.
There is no string type in C, the semantics of nul-terminated
strings are created in the behavior of certain functions.
I think that your code should look like the following (not tested) :
struct MyStruct
{
int iMyInt;
float fMyFloat;
char szMyString[5];
long lMyLong
}
int main ()
{
struct MyStruct sStruct;
unsigned char szEncrypted[...];
RSA Rsa;
i
One danger with casting a structure as a string is that zero bytes
(which can happen due to "slack bits" in the structure) might be
interpreted as an end-of-string that would prematurely terminate
the data.
If you're going to process binary data, look for an API where you
specify both a pointer and
Hi Marc,
I am sorry, I am not sure how I can type cast the structure to string,
should I do (char *) ?
Once I encrypt I am not sure if the encrypted string has the
same structure as the original "structure".
Can you please show me the synatx to type cast a structure to string.
Thanks,
Jayashree
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jayashree Kanchana wrote:
| Hi,
|
| I am hoping that someone might have come across this problem and will be
| able to help me.
|
| I am trying to use openssl to encrypt a "c structure" instead of just a
| "string", is there any function in openssl that
Maybe you could cast the contents of your structure to a string, encrypt this string
and then cast the string back to your structure type.
Marc.
> -Message d'origine-
> De : Jayashree Kanchana [mailto:[EMAIL PROTECTED]
> Envoyé : mardi 3 août 2004 16:00
> À : [EMAIL PROTECTED]
> Objet :
Hi,
I am hoping that someone might have come across this problem and will be
able to help me.
I am trying to use openssl to encrypt a "c structure" instead of just a
"string", is there any function in openssl that I could use?
I have a RSA key structure that is already created and I am able to
e
>> http://www.opensc.org/files/doc/opensc.html#opensc.using.openssl
>
> btw: what kind of usb token do you have ?
Aladdin eToken pro 32k.
Opensc now recognices my USB token. When I try to load the engine I get:
mtag03:/home/rho/et2k/opensc-0.8.1 # openssl
OpenSSL> engine dynamic -pre
SO_PATH:/us
Hi all!
I'm trying to scratch a distpoint from an X509
certificate. When I use this code,
STACK_OF(DIST_POINT) * distpoints = NULL;
distpoints = X509_get_ext_d2i(x,
NID_crl_distribution_points, NULL, NULL);
an error occurs:
invalid conversion from `void*' to `STACK*
Someone can help me?
Thank
On Mon, Aug 02, 2004, Alicia da Conceicao wrote:
> Hi Steve:
>
> > Its not ASN1 because the OpenSSL ASN1 code isn't fully streaming and to do so
> > would be a massive undertaking which has so far not attracted any interest.
> > The data following the salt is the raw encrypted data using standard
You can use a memory bio and then the appropiate PEM I/O function.
Something like:
BIO *bioMem;
char *keyBuffer;
X509 *cert;
/* Read de buffer (bla,bla,bla) :-) */
/* And now... */
bioMem =3D BIO_new_mem_buf(keyBuffer, keyBufferLen);
cert =3D PEM_read_bio_X509(bioMem,NULL,NULL,NULL);
---
Juan
Hello all,
I had a query wrt the finished handshake message that the server sends in
the TLS protocol.
I'm using openssl-0.9.6g.
When the server sends the Handshake finished message , in the ethereal dump
the Finished handshake message is shown as "Encrypted Handshake Message"
with Length as 32 b
Ralf Hornik Mailings wrote:
Yes, I know, but I don't find any pointer to this engines. Even, there is
no pkcs11 or opensc word in the complete openssl-source!
Do I have to include the hw_* files from opensc manually? What engine id
will it be? Has anyone done this in practice?
Found the solution m
> Yes, I know, but I don't find any pointer to this engines. Even, there is
> no pkcs11 or opensc word in the complete openssl-source!
>
> Do I have to include the hw_* files from opensc manually? What engine id
> will it be? Has anyone done this in practice?
Found the solution myself! :-)
http:/
> Keys at least: there's an openssl engine for opensc aKeys at least:
> there's
> an openssl engine for opensc and one for pkcs11 libraries at
> www.opensc.org
Yes, I know, but I don't find any pointer to this engines. Even, there is
no pkcs11 or opensc word in the complete openssl-source!
Do I
16 matches
Mail list logo