RE: CRYPTO_add_lock segfault when attempting to open X509 CSR

2014-03-19 Thread Dave Thompson
Initialize cert either to null or to a valid X509_REQ object (X509_REQ_new()) before d2i. If null a new object will be allocated and the pointer set; if nonnull the object will be reused. See the man page for d2i_X509 especially under WARNINGS. Lots of info about d2i_x and i2d_x routines for

Re: How to extract ECC signature bytes from EVP_DigestSignFinal's signature

2014-03-19 Thread Jeffrey Walton
On Tue, Mar 18, 2014 at 1:02 PM, axisofevil wrote: > I dug into source - it's in DER format so a sleezy hacked function is this: ( > I use curve NID_X9_62_prime256v1 ) > ECDSA_SIG * sig > BIGNUM * r; > BIGNUM * s; > > /* A correct DER-encoded signatu

Re: How to extract ECC signature bytes from EVP_DigestSignFinal's signature

2014-03-19 Thread Dr. Stephen Henson
On Tue, Mar 18, 2014, axisofevil wrote: > I dug into source - it's in DER format so a sleezy hacked function is this: ( > I use curve NID_X9_62_prime256v1 ) > ECDSA_SIG * sig > BIGNUM * r; > BIGNUM * s; > > /* A correct DER-encoded signature has the fol

Re: CRYPTO_add_lock segfault when attempting to open X509 CSR

2014-03-19 Thread TomTomarchand
You need to initialize cert to either NULL or a valid pointer. On Mar 18, 2014, at 8:21 AM, Nikita Koptelov wrote: > Good day, > I'm trying to use openSSL libs to parse certificate request, but something > goes wrong. > The thread throws segfault around: > > > 0x777fee0a <+0x007a>

Re: CRL generating server, not from command line

2014-03-19 Thread Tom Francis
On Mar 18, 2014, at 2:19 PM, Clesmon University wrote: > Hello: > > What I can find online or in book "Network security with OpenSSL" is using > command line to generte a CRL. However, what I want to do is to let my > server receive a serial number from outside interface and generate a CRL.

Re: How to extract ECC signature bytes from EVP_DigestSignFinal's signature

2014-03-19 Thread axisofevil
I dug into source - it's in DER format so a sleezy hacked function is this: ( I use curve NID_X9_62_prime256v1 ) ECDSA_SIG * sig BIGNUM * r; BIGNUM * s; /* A correct DER-encoded signature has the following form: 0x30: a header by

CRYPTO_add_lock segfault when attempting to open X509 CSR

2014-03-19 Thread Nikita Koptelov
Good day, I'm trying to use openSSL libs to parse certificate request, but something goes wrong. The thread throws segfault around: 0x777fee0a <+0x007a> mov%r8d,%ecx 0x777fee0d <+0x007d> mov%r13d,(%r12) 0x777fee11 <+0x0081> callq 0x777fe000