301

(1 replies, posted in wolfSSL)

Hi vishwasrao.salunkhe,

wolfSSL does not yet have out-of-the box support for Zehpyr RTOS. If this is something you would like to see added eventually just shoot us an email at support@wolfssl.com to register it as a feature request!

Feature requests are worked on when we have free time and there are no associated timelines unless a user/entitiy has a need and decides to fund the effort in order to accelerate to a guaranteed timeline.

Unfunded feature requests are prioritized by the number of unique customers requesting a given feature and time associated with the effort (for example a feature that has 2 requests and is estimated to take 1 day would be prioritized higher than one with 2 requests but estimated to take 1 week of effort).

Warm Regards,

- K

302

(6 replies, posted in wolfSSL)

Hi oleksandr.tymoshenko,

Sorry for the delayed response! Glad to hear this was resolved by using the Server Name Indication Extension (SNI)!


Warm Regards,

- K

303

(12 replies, posted in wolfSSL)

Hi Mark,

Do you have the setting

#define HAVE_ECC

set in the TIRTOS section of wolfssl-3.15.5/wolfssl/wolfcrypt/settings.h?

304

(4 replies, posted in wolfSSL)

Dervin,

Glad to see you resolved by defining NO_FILESYSTEM, WOLFSSL_NO_VERIFYSERVER

- K

Hi Tobias01,

Thank you for contacting wolfSSL via the forums with your questions!

Unfortunately wolfSSL does not yet support parsing of RsaPSS certificates and the certs in your test program are using RsaPSS! Have you tried testing with other signature algorithms?

RsaPSS certs are not common by any means in fact this is the first time I personally have seen an inquiry about them in my 4 years working here at wolfSSL! Could you tell us what it is your are working on and how you came about testing these certs? What are the end goals for your project and what will your product do?

The error code you've encountered "Cert name lacks set header, trying sequence" is due to the ASN fields present in an RsaPSS cert that are not present in certificates that use signature algorithms supported by wolfSSL. Here is the contents of an RsaPSS Signature Algorithm cert:

    SEQUENCE (2 elem)
      OBJECT IDENTIFIER 1.2.840.113549.1.1.10 rsaPSS (PKCS #1)
      SEQUENCE (4 elem)
        [0] (1 elem)
          SEQUENCE (2 elem)
            OBJECT IDENTIFIER 1.3.14.3.2.26 sha1 (OIW)
            NULL
        [1] (1 elem)
          SEQUENCE (2 elem)
            OBJECT IDENTIFIER 1.2.840.113549.1.1.8 pkcs1-MGF (PKCS #1)
            SEQUENCE (2 elem)
              OBJECT IDENTIFIER 1.3.14.3.2.26 sha1 (OIW)
              NULL
        [2] (1 elem)
          INTEGER 20
        [3] (1 elem)
          INTEGER 1
    SEQUENCE (6 elem) <--- START OF CERT NAME
      SET (1 elem)
        SEQUENCE (2 elem)
          OBJECT IDENTIFIER 2.5.4.6 countryName (X.520 DN component)
          PrintableString DE

and here is what the ASN1 syntax is for the signature algorithms supported by wolfSSL:

    SEQUENCE (2 elem)
      OBJECT IDENTIFIER 1.2.840.113549.1.1.11 sha256WithRSAEncryption (PKCS #1)
      NULL
    SEQUENCE (7 elem) <--- START OF CERT NAME
      SET (1 elem)
        SEQUENCE (2 elem)
          OBJECT IDENTIFIER 2.5.4.6 countryName (X.520 DN component)
          PrintableString US

So you can see in the RsaPSS certificate you sent there are several more Sequences in the cert that would need to be processed before reaching the cert name field unlike in the certificate types supported by wolfSSL which expect only a single sequence followed by the cert name.

If you would like we could add a feature request on your behalf? IE: "Add support for RsaPSS signature algorithm certificates".

Feature requests are worked on when we have spare time and there is no timeline associated with them unless a customer has a need and wishes to fund the effort in order to accelerate the timeline. Let me know if you would like me to add it to our feature request list or if this is just something you happened across and were curious why it didn't work.

Warm Regards,

K

306

(4 replies, posted in wolfSSL)

Hi dervin,

Thank you for contacting wolfSSL via the forums with your questions!

It looks like that might simply be a typo in the code. Could you try changing the line to use

XMEMSET

instead of

MEMSET

and let us know if that resolves the issues?

Warm Regards,

K

307

(2 replies, posted in wolfSSL)

Hi Markus,

Thank you for contacting wolfSSL via the forums with your questions!

Have you tried simply loading the entire directory so you don't have to build up trust chains like you described? The way to load all certs in a directory for verification purposes is like the example below:

      int ret;                                                                     
      WOLFSSL_CTX* ctx;                                                            
                                                                                   
      wolfSSL_Init();                                                              
                                            
      ctx = wolfSSL_CTX_new(wolfSSLv23_server_method());                           
      if (ctx == NULL) {                                                           
          printf("CTX init failed\n");                                             
          return -1;                                                               
      }                                                                            
      // Load every cert in the directory "./certs" rather than loading a specific file
      ret = wolfSSL_CTX_load_verify_locations(ctx, NULL, "./certs");             
      printf("ret = %d\n", ret);                                                   
                                                                                   
      return 0; 

Regards,

K

308

(6 replies, posted in wolfSSL)

Hi zeta,

Apologies as we have had a busy holiday season here in the U.S. I will review your latest first thing tomorrow and get back to you!

- Kaleb

309

(1 replies, posted in wolfSSL)

Hi Alex,

We are not sure as that is not a project we here at wolfSSL worked on however were you aware we recently added our own solution here: https://github.com/wolfSSL/wolfssl/tree … if/ESP-IDF

(Or in our download wolfssl-3.15.5/IDE/Espressif/ESP-IDF)

To get the solution you pointed out from the espressif community build time issues resolved we would recommend opening an issue on the github repo to see if someone from that community can assist with that!

Warmest Regards,

Kaleb

Being handled via Zendesk (support@wolfssl.com), will post a solution for public use here once issues are resolved.

311

(6 replies, posted in wolfSSL)

Hi oleksandr.tymoshenko,

Thank you for reaching out to wolfSSL with your questions!

In the README for the esspressif example did you follow the steps:

STEP 3: Modify Makefile to define WOLFSSL_USER_SETTINGS
STEP 4: Copy user_setting.h to your project's include folder
since WOLFSSL_USER_SETTINGS is defined, it'll allow you to use the setting by yourself in user_setting.h.

If so can you tell me what settings are in your user_settings.h header?

Have you defined these two settings?

#define HAVE_ECC
#define HAVE_CURVE25519

If not the connection will not work. I ran a scan against the target and the only supported cipher suites are below, they all use curve25519 (HAVE_CURVE25519) and ECDHE (HAVE_ECC) for key exchange:

scan report for iot-stg.dealor.co.il (35.198.100.186)
Host is up (0.19s latency).
rDNS record for 35.198.100.186: 186.100.198.35.bc.googleusercontent.com

PORT    STATE SERVICE
443/tcp open  https
| ssl-enum-ciphers: 
|   TLSv1.2: 
|     ciphers: 
|       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (ecdh_x25519) - A
|       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (ecdh_x25519) - A
|     compressors: 
|       NULL
|     cipher preference: server
|_  least strength: A

I can also test successfully from our default client app on a host PC so it looks like you just need to configure the library to support the same features as your target and you will be good to go!

$kalebhimes/wolfssl$ ./examples/client/client -h iot-stg.dealor.co.il -p 443 -d -g

peer's cert info:
 issuer : /O=Acme Co/CN=Kubernetes Ingress Controller Fake Certificate
 subject: /O=Acme Co/CN=Kubernetes Ingress Controller Fake Certificate
 altname = ingress.local
 serial number:4d:75:69:c3:b8:24:f6:80:ae:4a:7b:b6:0c:71:6f:a8 
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
SSL curve name is SECP256R1
Client Random : 43EF32C80F0BABE85150A4F7422B6BBD2A81901380A117A6CBF5A4194F959A3F
SSL connect ok, sending GET...
HTTP/1.1 404 Not Found
Server: nginx/1.15.5
Date: Thu, 15 Nov 2018 23:17:28 G
MT
Content-Type: text/plain; charset=utf-8
Content-Length: 21
Connection: cl

312

(12 replies, posted in wolfSSL)

Hi Mark,

I ran a quick test to see if that server does reject connections that do not present he supported curves extension and sure enough it does reject such connections!

RESULTS:

Test without supported curves extension:

./configure --disable-supportedcurves
make
./examples/client/client -d -g -h example.com -p 443
wolfSSL_connect error -313, revcd alert fatal error
wolfSSL error: wolfSSL_connect failed

Test WITH supported curves extension:

./configure --enable-supportedcurves
make
./examples/client/client -d -g -h example.com -p 443
ECDHE-RSA-AES128-GCM-SHA256
SSL version is TLSv1.2
SSL cipher suite is TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
SSL curve name is SECP256R1
SSL connect ok, sending GET...
HTTP/1.0 200 OK
Accept-Ranges: bytes
Content-Type: text/html
Date: Tue, 13 N
ov 2018 17:24:28 GMT
Last-Modified: Tue, 13 Nov 2018 16:54:12 GMT
Server: ECS

Could you add the settings

#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS

To the WOLFSSL_TIRTOS section in your version of wolfSSL, rebuild the application, and run the test again? Let me know your results!

- K

313

(12 replies, posted in wolfSSL)

Hi Mark,

Thanks for the logs, that is helpful because I can see the connection is aborted by the server sending alert 40 immediately after the client hello message is received. This indicates the server is looking for something and the client isn't sending it so the server isn't going to waste anymore time on that particular handshake.

The most common occurrence of this is from extensions, mis-matched cipher suites, and/or wrong protocol version. Could you check if the below defines are present in the WOLFSSL_TIRTOS section of wolfssl-3.15.5/wolfssl/wolfcrypt/settings.h

#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS

If you are using an older version of wolfSSL (IE not v3.15.5) then let me know which version you are on and if those settings are present.

Are you able to capture a wireshark trace? If not is the server you're connecting to public? Could we test it ourselves to see which cipher suites and protocol versions it supports?

- K

314

(6 replies, posted in wolfSSL)

Hi @zeta,

I have let our business management team know of your request for consulting prices. Please watch for a direct email from one of the wolfSSL business managers shortly!

Warm Regards,

- K

315

(12 replies, posted in wolfSSL)

Hi Mark,

Thanks for reaching out to wolfSSL. Can you tell me where the example came from? Is it an example we maintain and distribute or is it from a third party?

Two things that can assist us in debugging the issue. If you add the setting "#define DEBUG_WOLFSSL" to your project and then invoke

wolfSSL_Debugging_ON();

in your application and send us the log that can be most helpful.

Also if you are able to sniff the connection with wireshark and send us a .pcap of the failed connection that can also provide very useful insight into issues.

As for the -1 error code, if it came from the TLS level it would indicate a failure at the TLS level but is not overly useful as TLS errors can be for many reasons. If you can get the internal error code that is more useful for determining what occurred. This can be fetched with:

int err;
char buffer[WOLFSSL_MAX_ERROR_SZ];

...

err = wolfSSL_get_error(ssl, 0);
printf("error code at time of failure was: %d, %s\n", err,                   
                                         wolfSSL_ERR_error_string(err, buffer));

Warm Regards,

K

316

(6 replies, posted in wolfSSL)

SamSam,

Can you tell me what system your are building on, architecture and compiler version you are working with? We'd like to reproduce this on our end for implementing a fix. Thanks!

317

(6 replies, posted in wolfSSL)

Hi SamSam,

That domain only supports static RSA cipher suites which wolfSSL disables by default because they are not considered as safe as Perfect Forward Secrecy provided by DHE or ECDHE cipher suites.

Please try this test instead:

git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh
./configure  --enable-all CFLAGS=-DWOLFSSL_STATIC_RSA
make

examples/client/.libs/client -S pro.beatport.com  -h pro.beatport.com  -p 443 -d -x -C -g -i -v d

Let me know your results.


Warm Regards,

Kaleb

318

(4 replies, posted in wolfSSL)

Hi jb3,

It would be my pleasure to provide some insight on these items!

1) Why does the server need to load 3 different PEM files ?
2) What is the relationship between those 3 PEM files?
3) What type of certs are those 3 PEM files?

The number three is not fixed! A server has two requirements to load:
1) An "entity certificate" and chain of trust
The "entity certificate" is used to identify the server to clients connecting to it, the cert that signed the "entity cert" (often times an intermediate CA), and all certs in the chain providing a complete chain of trust back to the ROOT CA. The server is NOT REQUIRED to load the ROOT CA because the client is expected to already have a copy in order to validate the server. Root CA's are provided by trusted entities such as GlobalSign, GoDaddy, LetsEncrypt, etc. When setting up a trust chain order does matter as each cert loaded must be able to validate the previously loaded cert in the chain with the only exception being the "entity cert". When loading a cert chain with wolfSSL_CTX_use_certificate_[file | buffer], the file or buffer must be organized with the "entity cert" first followed by the signer of the entity cert followed by the cert that signed that signer and so on up to the last cert in the trust chain. ONLY the Root CA is not required to be loaded but you can load the Root CA too if you wish, the Root CA is the only one that is optional and not required to be loaded.

2) The server must load a private key associated with the "entity certificate" ONLY. No other keys need to be loaded, just the one used when creating the entity certificate. Use wolfSSL_CTX_use_PrivateKey_[file | buffer] to load the private key.

(OPTIONAL ITEM) 3) If the server is validating clients that connect to it (99.9% of all servers do NOT do this) then the server will need to load the ROOT CA only** that ultimately signed the clients certificate chain. This is loaded with wolfSSL_CTX_load_verify_locations.

EXAMPLE:
If you go to https://www.google.com and look at the certificate chain for the website you will see three (again this is not a fixed number, just so happens to be 3 in this case) certificates. The top-most cert being "GlobalSign", the second cert being "Google Internet Authority G3" and the bottom most cert being the "Entity Cert" and it is "www.google.com". (See attached screen shot)

YOUR ITEMS:
So when you call CyaSSL_CTX_load_verify_locations(ctx, "../../BRU-support/wolfssl/wolfssl-3.15.0/certs/ca-cert.pem",0) you are loading the ca that signed the clients certificate chain. This means the server is doing mutual authentication. Again 99.9% of all servers do not do this, we have this as default in our example server because it is the most secure solution. However we are aware that it is not practical for servers such as google to load a cert unique to every phone, laptop, pc, tablet, smart TV, etc in the world that might connect to a google server.

When you call CyaSSL_CTX_use_certificate_file(ctx,"../../BRU-support/wolfssl/wolfssl-3.15.0/certs/server-cert.pem" you are loading the certificate that identifies the server and starts it's trust chain. The client will receive a copy of the certs in server-cert.pem (there are more than one in there) during the TLS handshake and use that chain to validate the server against any Root CA's the client has loaded to use for validating peers. (The client will be calling wolfSSL_CTX_load_verify_locations with ca-cert.pem which is the CA that signed the server-cert.pem chain)

Finally when you call CyaSSL_CTX_use_PrivateKey_file(ctx,"../../BRU-support/wolfssl/wolfssl-3.15.0/certs/server-key.pem" you are loading the private key used when creating the "entity cert" that is in server-cert.pem

4) How would I go about generating my own 3 PEM files using openssl or some other application?  For me to do this I think I need to know what type of PEM files they are ... ?

We have examples of using the openssl command line tool in the script <wolfssl-root>/certs/renewcerts.sh You can use those examples to generate your own keys and certs. Those certificates however will only be good for testing. Ultimately if you are looking to stand up your own valid website you will need to use openssl command line tool to create what is called a "certificate signing request" or CSR for short. You would then send that "CSR" to a trusted root provider such as GoDaddy, GlobalSign, LetsEncrypt, etc and they will use your CSR to generate a certificate for you and sign it using their trust chain. This way your website will be trusted by all common browsers (Chrome, IE, FireFox, Safari, etc).

Please let me know if you have any other questions on this subject or if you need clarification on any of my answer above.


Warm Regards,

- Kaleb


** There are cases where servers or clients that send trust chains do not send the entire chain of trust and the other side must then load all certs from the trust chain that were not sent during the connection in addition to the ROOT CA. For example:

If you have a chain for your server where "E" is the entity cert and "A" is the Root CA where A signed B signed C signed D signed E

(A->B->C->D->E)

Now lets assume the server is improperly setup and only loads C->D->E when calling wolfSSL_CTX_use_certificate_[file | buffer] and the client has only loaded "A" using wolfSSL_CTX_load_verify_locations. This connection would fail because the client ends up with a missing link in the chain:

(A->?->C->D->E)

In this scenario the client would have to load both certs "A" and "B" since the server is improperly not sending it's entire trust chain with the only exception being the Root CA.

319

(3 replies, posted in wolfSSL)

EDIT MADE:

https://www.wolfssl.com/forums/post2910.html#p2910 has been update with the correct spelling in the response

OLD:

There is a perl script located here: <wolfssl-root>/gencertbuff.pl

UPDATE:

There is a perl script located here: <wolfssl-root>/gencertbuf.pl

Thanks for the catch!

- Kaleb

320

(5 replies, posted in wolfSSL)

Hi @fvillaf,

Can you tell us a little about what it is you're working on the end goals for the project? We provide PK callbacks to resolve your situation when using hardware keys at the TLS level.

Looking forward to hearing more about your project!


K

321

(12 replies, posted in wolfSSL)

Hi @stanislavirin,

Can you tell us a little about what it is you are working on and the end goals for the project?

- K

322

(12 replies, posted in wolfSSL)

Hi @stanislavirin

Please find attached documentation for static memory solution!

I think this will clear some things up!

Warmest Regards,

K

323

(1 replies, posted in wolfSSL)

@vijaykumar.ppsg

Thanks again for contacting us via the forums! Solution is to load using wolfSSL_use_certificate_[ buffer | file ] for loading a chain for sending to clients. Load order is bottom to top with the root being optionally excluded as client must have the root loaded to verify so servers do not need to transmit it.

FILE CONTENTS:

SERVER CERT
Intermediate CA 1
Intermediate CA 2 ( If Applicable )
Intermediate CA ... X ( If Applicable )
Root CA ( Optional )

The API wolfSSL_CTX_load_verify_locations is for loading certs to use when VERIFYING peers. IE you would NOT use this API on the server side unless doing mutual authentication (99.9% of all servers do NOT do mutual authentication).

In the event you use this API load from the TOP down and the Root CA is required! Some peers do not transmit their entire cert chain even though the only exception is SUPPOSED to be the Root CA. If a peer only sends a partial chain you must load the rest of the chain from the top down IE file contents would be opposite of wolfSSL_CTX_use_certificate API:

FILE CONTENTS:

Root CA ( Required at a minimum )
Intermediate CA X ( If Applicable )
Intermediate CA X-1 ... ( If Applicable )
Intermediate CA 2 ( If Applicable )
Intermediate CA 1 ( If Applicable )

Warm Regards,

K

amar.paul,

Can you send us a sample of EVP encrypted data just to run though our parser to review the content format?

Warm Regards,

- K

325

(3 replies, posted in General Inquiries)

kjjy7,

Thank you for providing details on the effort. Can you share the contents of the parse_jason data? I am guessing there may be extra encoding in there and you may need to set the "idx" variable to the appropriate offset for start of the RsaKey (if in fact that is an RSA key and not some other key). If you can share the parse_jason string that this error results from we can gladly run some tests on our end to see what the issue might be.

To result in even quicker turn-around if you can send us a test.c application and all relevant headers that we can compile and execute to reproduce this we'll get you results asap.

- K