Extensions openssl

2004-10-05 Thread lbfi
Hi,

I'm looking for a way to retrieve
three extensions from a certificate.
They are 'Subject Directory Attributes',
'Policy Mappings' and 'Name Constraints'.

Although they are defined in RFC 2459,
I could not find its definition in
crypto/objects/objects.h (openssl 0.9.7c
distribution), nor could find any help
over the Internet.

Any help on this will be very appreciated.

Looking forward any response.

Thanks in advance.

 
__
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/


__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]


Re:Random number seed in RSA

2004-08-10 Thread lbfi
You can use these functions:

void RAND_seed(const void *buf, int num);

 void RAND_add(const void *buf, int num, double
entropy);

 int  RAND_status(void);

 int  RAND_event(UINT iMsg, WPARAM wParam, LPARAM
lParam);
 void RAND_screen(void);

You need to seed PRNG before the function
RSA_generate_key(...). a good explanation you will find
in:
http://www.openssl.org/docs/crypto/RAND_add.html

 Hi,
 I have a snippet that encrypts/decrypts using RSA.


 #include stdio.h

 #include openssl/rsa.h

 #include string.h

 // RSATest: Program illustrating Simple RSA
Encryption/Decryption

 int main()

 {

 char *plain=Sample text; //Sample text (plain text)
to Encrypt/Decrypt

 char *ciphertext;

 char *plain1;

 int enclen,i,declen;

 printf(%s\n,plain);



 // Generate RSA key

 RSA *rsa1= RSA_generate_key(1024,65537,NULL,NULL);

 // RSA_size() will determine how much memory must be
allocated for an RSA encrypted value

 ciphertext = (char *)malloc(RSA_size(rsa1));

 printf(RSA size %d,RSA_size(rsa1));



 I am using Cygwin. My question is thisWhere and
How do I seed the random number generator?

 Thanks,

 Joe





 -
 Do you Yahoo!?
 New and Improved Yahoo! Mail - Send 10MB messages!

Leandro Barros de Figueiredo
Eng. Controle e Automação - UFMG
 
__
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/


__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]