Open SSL API's Support For IPv6.
Hi, Currently we are using OpenSSL 0.9.8 version. I have question about few of the API's support for IPV6. 1) BIO_new_connect() 2) BIO_set_nbio() 3) BIO_do_connect() Queries : 1) Do the above mentioned API's support IPv6? 2) If yes, then is there any specific syntax for mentioning the IPv6 address and port (e.g. [IPv6 Address]:Port or IPv6 Address:Port)? 3) If not, then are there any alternate API's which support IPv6 functionality and we can use them for both IPv4 as well as IPv6 (rather than using these API)? Waiting for inputs. Any help would be great. Thanks Akanksha Shukla. -- View this message in context: http://old.nabble.com/Open-SSL-API%27s-Support-For-IPv6.-tp32503747p32503747.html Sent from the OpenSSL - User mailing list archive at Nabble.com. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: ike v2 windows 2008 r2 certificate
I know the OpenSSL equivalent of most of these fields, and I have tried to guess the last one, see below. On 9/21/2011 1:05 AM, Matthew F. Hymowitz wrote: We are trying to set up of VPN tunnel using IKE v2 between a windows 2008 VPN server and a linux machine running strongswan. We are trying to do this using machine certificates. We are using a Windows 2008 r2 private certificate authority. I am not sure how to generate the CSR in openssl for a machine certificate. In windows land we put information about the certificate into a .inf file with following content: [NewRequest] Subject=CN=MACHINE.DOMAIN.COM The CN specified in input to openssl req Exportable=TRUE openssl req option -keyout filename.key KeyLength=2048 openssl req option -newkey rsa:2048 KeySpec=1 Ignore (I think) KeyUsage=0xF0 OpenSSL Config file option keyusage=digitalSignature,nonRepudiation,keyEncipherment,dataEncipherment (I am not entirely sure of this one, I guessed 0xF0 represented bits 0 to 7 of this property, with the most significant bit being bit 0) MachineKeySet=TRUE openssl req option -keyout filename.key RequestType=CMC openssl req ProviderName=Microsoft RSA SChannel Cryptographic Provider Ignore, just specifies the engine to use with Microsoft CryptoAPI ProviderType=12 Ignore, just specifies the engine to use with Microsoft CryptoAPI [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 OID=1.3.6.1.5.5.7.3.2 OID=1.3.6.1.5.5.8.2.2 OpenSSL Config file option extendedKeyUsage=1.3.6.1.5.5.7.3.1,1.3.6.1.5.5.7.3.2,1.3.6.1.5.5.8.2.2 [RequestAttributes] SAN=dns:MACHINE.DOMAIN.COM OpenSSL Config file option subjectAltName=dns:MACHINE.DOMAIN.COM This inf file is then used as input to the CSR. Can I/How would I/ tell open SSL to generate an equivalent CSR. Any insight someong could provide would be much appreciated. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
TLS 1.0 cracked...
The Register published an article yesterday that some people here might be interested in on TLS 1.0 being cracked: http://www.theregister.co.uk/2011/09/19/beast_exploits_paypal_ssl/ The Register points their Finger of Blame right at OpenSSL. Of course, a lot of places then blew this out of proportion with headlines along the lines of, ZOMG! HTTPS/SSL Intertubes Hacked! i can haz your internets?!?! Right now, no one really knows anything about the research that is supposedly going to be published on Friday. -- Thomas Hruska Shining Light Productions Home of BMP2AVI and Win32 OpenSSL. http://www.slproweb.com/ __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: TLS 1.0 cracked...
Hi, This have been already discussed in the openssl-dev mailing list. Go to the mailing list archive and take a look at the subject openssl 1.0.1 and rumors about TLS 1.0 attacks. To be brief, this attack has been known for 7 years now and OpenSSL implemented an effective countermeasure against it since version 0.9.6d (insertion of empty fragments). So, an OpenSSL based web server is immune from this attack, unless it uses the flag SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS. Links cited in the dev mailing list : - http://www.openssl.org/~bodo/tls-cbc.txt , section 2. - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.61.5887rep=rep1type=pdf : a 2006 paper discribing the attack and the OpenSSL countermeasure. Cheers, -- Mounir IDRASSI IDRIX http://www.idrix.fr On 9/21/2011 4:48 PM, Thomas J. Hruska wrote: The Register published an article yesterday that some people here might be interested in on TLS 1.0 being cracked: http://www.theregister.co.uk/2011/09/19/beast_exploits_paypal_ssl/ The Register points their Finger of Blame right at OpenSSL. Of course, a lot of places then blew this out of proportion with headlines along the lines of, ZOMG! HTTPS/SSL Intertubes Hacked! i can haz your internets?!?! Right now, no one really knows anything about the research that is supposedly going to be published on Friday. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
View OCSP response in CMS
Hello folks, I'm developing a tool for signing digital TV apps, and one of the goals was to embed OCSP responses into the CMS signature file of the application. The idea is that the broadcaster equipment would query the OCSP and update the response with certain frequency, so that the receiver could check the certificate validity without Internet connection. Well, using the BouncyCastle lib I've forcedly embedded the response in the OtherRevocationInfoFormat field of the CMS file, but OpenSSL does not like the way I did it: - openssl cms -cmsout -print -inform der -in /tmp/sig3/META-INF/BR-ecdsaTest.EC Error reading S/MIME message 3076389608:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1319: 3076389608:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=X509_CRL_INFO 3076389608:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:751:Field=crl, Type=X509_CRL 3076389608:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:751: 3076389608:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:339:Field=d.crl, Type=CMS_RevocationInfoChoice This could be because I'm doing something wrong (probably) or because OpenSSL (1.0e) is alway expecting a CRL set where other kind of revocation info could be present. I couldn't find a clear way to do insert OCSP responses into a CMS structure. The RFCs are the clearer source I could get: RFC 3852 - CMS structure: SignedData ::= SEQUENCE { version CMSVersion, digestAlgorithms DigestAlgorithmIdentifiers, encapContentInfo EncapsulatedContentInfo, certificates [0] IMPLICIT CertificateSet OPTIONAL, crls [1] IMPLICIT RevocationInfoChoices OPTIONAL, signerInfos SignerInfos } RFC 5940 - RevocationInfoChoices structure: RevocationInfoChoice ::= CHOICE { crl CertificateList, other [1] IMPLICIT OtherRevocationInfoFormat } OtherRevocationInfoFormat ::= SEQUENCE { otherRevInfoFormat OBJECT IDENTIFIER, otherRevInfo ANY DEFINED BY otherRevInfoFormat } So my question is, does OpenSSL support OCSP responses in CMS structures? (by support I mean it won't break - if it can parse the structure without knowing what to do is enough) OpenSSL is my base reference, so if it cannot even print-out the CSM structure I don't know of other tools I can use. Ideally, I don't want to create a proprietary format of CMS signatures. For those interested, this is how the messages look inside: SEQUENCE(2 elem) //Regular CMS structure with an embedded CRL - OpenSSL understands it OBJECT IDENTIFIER1.2.840.113549.1.7.2 //signedData PKCS #7 [0](1) //SignedData SEQUENCE(6 elem) //RFC 3852 INTEGER 3 //CMS version SET(1 elem) //folded - digest algs. SEQUENCE(1 elem) //folded - encap. content info [0](2) //folded - certificates [1](1) //CRLS SEQUENCE(3 elem) //start of CRL structure SEQUENCE(6 elem) INTEGER 1 //Version 2 SEQUENCE(1 elem) OBJECT IDENTIFIER1.2.840.10045.4.1 // issuer sig. alg.: ecdsa-with-SHA1 SEQUENCE(6 elem) //folded - Issuer: /C=BR/ST=SP/L=Sao Paulo/O=ACME SA/OU=bank/CN=ACME root CA UTCTime 11-09-21 13:58:48 UTC //issued at UTCTime 11-11-10 13:58:48 UTC //valid till [0](1) //folded - certificate list SEQUENCE(1 elem) OBJECT IDENTIFIER1.2.840.10045.4.1 // CRL sig. alg.: ecdsa-with-SHA1 BIT STRING(1 elem) //folded - CRL signature SET(1 elem) //folded - CMS signer info SEQUENCE(2 elem) //Modified CMS structure with an embedded OCSP response - OpenSSL don't like it OBJECT IDENTIFIER1.2.840.113549.1.7.2 //signedData PKCS #7 [0](1) //SignedData SEQUENCE(6 elem) //RFC 3852 INTEGER 3 //CMS version SET(1 elem) //folded - digest algs. SEQUENCE(1 elem) //folded - encap. content info [0](2) //folded - certificates [1](1) //CRLS SEQUENCE(2 elem) //OCSP response OBJECT IDENTIFIER 1.3.6.1.5.5.7.48.1.1 // ocspBasic OCTET STRING (1 elem) //folded - issuer identification and certificate SEQUENCE(4 elem) SEQUENCE(4 elem)
Openssl 1.0.0e: dtls segmentation fault after set SSL_OP_NO_QUERY_MTU
Hi, I don't know if any other person met this issue. I use openssl1.0.0e, and working on dtls, in client side, if I set SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ss_ssl, 1500); I met a segmentation fault on the client side, using gdb I saw the error happens in: memcpy() dtls_do_write() dtls_connect() And if I remove SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ssl, 1500); It worked well. For the same program if I run in Openssl 0.9.8e, it worked well with set SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ss_ssl, 1500); So I am thinking this may be a bug in Openssl 1.0.0e. -- Thank you. Best Regards, Huaqing Wang
Re: View OCSP response in CMS
On Wed, Sep 21, 2011, Gabriel Marques wrote: I'm developing a tool for signing digital TV apps, and one of the goals was to embed OCSP responses into the CMS signature file of the application. The idea is that the broadcaster equipment would query the OCSP and update the response with certain frequency, so that the receiver could check the certificate validity without Internet connection.br br Well, using the BouncyCastle lib I've forcedly embedded the response in the OtherRevocationInfoFormat field of the CMS file, but OpenSSL does not like the way I did it: Please don't post using HTML. It looks like the encoding is wrong, the data is being embedded as though it is a CRL hence the parsing error. If you could include the encoded test data with another message I could confirm that. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Open SSL API's Support For IPv6.
On 21 Sep 2011, at 6:17 AM, Akanksha Shukla wrote: Currently we are using OpenSSL 0.9.8 version. I have question about few of the API's support for IPV6. 1) BIO_new_connect() [...] Queries : 1) Do the above mentioned API's support IPv6? I don't think so. BIO_new_connect() (and BIO_get_host_ip() which it calls) only deal in IPv4 addresses. As far as I know, though, you should be able to make an IPv6 socket connection yourself, pass it to BIO_new_socket(), and have it work. It's just the hostname/address lookup that is address-family specific. (Oddly, the server side of things (accept() etc.) seems to have been extended to support IPv6 already.) __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Re: Openssl 1.0.0e: dtls segmentation fault after set SSL_OP_NO_QUERY_MTU
On Sep 21, 2011, at 9:40 PM, Huaqing Wang wrote: Hi, I don't know if any other person met this issue. I use openssl1.0.0e, and working on dtls, in client side, if I set SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ss_ssl, 1500); I met a segmentation fault on the client side, using gdb I saw the error happens in: memcpy() dtls_do_write() dtls_connect() And if I remove SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ssl, 1500); It worked well. For the same program if I run in Openssl 0.9.8e, it worked well with set SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU); SSL_set_mtu(ss_ssl, 1500); So I am thinking this may be a bug in Openssl 1.0.0e. I think you are hitting a bug for which a fix has already been submitted by Robin to the request tracker. See http://rt.openssl.org/Ticket/Display.html?id=2602 Please let us know if this fixes your issue. Best regards Michael -- Thank you. Best Regards, Huaqing Wang __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager majord...@openssl.org
Convert ASN1_OCTET_STRING contents to ASN1 Sequence
Does anyone know of a way to take an ASN1_OCTET_STRING that contains a DER encoded Sequence and extract the contents of the Sequence as an ASN1_STRING. Essentially, I want to construct an ASN1 object of the Sequence. I guess I could manually parse the Sequence (and deal with the different types of length encoding) but I figure there must be an easier way. Thanks, CLee