Kenmore Open Source Software Notice Specification

Welcome to the Kenmore Open Source Distribution system.

Kenmore is pleased to make available source code relating to certain open source software on this website.

The copyright in the source code is owned by Kenmore and/or other third parties.

The source code is made available subject 1) the license terms set forth in Kenmore's product-specific Open Source Software Notices, which are listed by category and product above and may be accessed by clicking the applicable drop-down menu; and 2) the additional terms set forth below.

The open source software and source code are provided to you on an "AS IS" basis and Kenmore, its affiliates and subsidiaries disclaim any and all warranties and representations with respect to such software and related source code, whether express, implied, statutory or otherwise, including without limitation, any implied warranties of title, non-infringement, merchantability, satisfactory quality, accuracy or fitness for a particular purpose.

Kenmore shall not be liable to make any corrections to the open source software or source code or to provide any support or assistance with respect to it.

Kenmore disclaims any and all liability arising out of or in connection with the use of this software and/or source code.

This statement does not impair or enhance any warranty or disclaimer which Kenmore provides in respect of any Kenmore product which incorporate our relevant open source software.

This site opened in December 2016. For information regarding products released prior to this date, please refer to the relevant product manuals.

MIT License

JSMN
Copyright © 2010 Serge A. Zaitsev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

BSD 3-Clause License

XySSL
Copyright © 2006-2008, Christophe Devine.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of XySSL nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cJSON/license

Copyright © 2009 Dave Gamble

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

micro-ecc/license

Copyright © 2014, Kenneth MacKay

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

musl/license

Copyright © 2005-2014 Rich Felker, et al.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cJSON/license

Copyright © 2009 Dave Gamble

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

micro-ecc/license

Copyright © 2014, Kenneth MacKay
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

musl/license

Copyright © 2005-2014 Rich Felker, et al.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

cJSON/license

Copyright © 2009 Dave Gamble

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

MIT License/JSMN

jsmn (pronounced like ‘jasmine’) is a minimalistic JSON parser in C. It can be easily integrated into the resource-limited projects or embedded systems.

You can find more information about JSON format at json.org.

Library sources are available at https://github.com/zserge/jsmn.

  1. PHILOSOPHY

Usually JSON parsers convert JSON string to internal object representation. But if you are using C it becomes tricky as there is no hash tables, no reflection etc. That’s why most JSON parsers written in C try to reinvent the wheel, and either invent custom JSON-like objects, custom hash maps, or use callbacks like SAX parsers do.

jsmn is missing all that functionality, but instead is designed to be robust (it should work fine even with erroneous data), fast (it parses data on the fly and is re-entrant), portable (no superfluous dependencies or non-standard C extensions). And of course, simplicity is a key feature.

  1. FEATURES

  • simple

  • highly portable (tested on x86/amd64, ARM, AVR)

  • compatible with C89

  • no dependencies (even libc!)

  • no dynamic memory allocation

  • extremely small code footprint - it’s just about 200 LOC

  • API has only 2 functions

  • incremental single-pass parsing

  • library code is covered with tests

  1. DESIGN

jsmn splits JSON string into tokens. Let’s consider a JSON string:

'{ "name" : "Jack", "age" : 27 }'

jsmn will split it into the following tokens:

  • Object: { "name" : "Jack", "age" : 27} (the whole object)

  • Strings: "name", "Jack", "age" (keys and some values)

  • Number: 27

The key moment is that jsmn tokens do not hold any data, but just point to the token boundaries in JSON string instead. In the example above jsmn creates tokens like:

  • Object [0..31]

  • String [3..7], String [12..16], String [20..23]

  • Number [27..29].

Every jsmn token has a type which is one of the following:

  • Object - a container of key-value pairs, e.g.: { "foo":"bar", "x":0.3 }

  • Array - a sequence of values, e.g.: [ 1, 2, 3 ]

  • String - a quoted sequence of chars, e.g.: "foo"

  • Primitive - a number, a boolean (true, false) or null

Besides start/end positions, jsmn tokens for complex types (like arrays or objects) also contain a number of child items, so you can easily follow object hierarchy.

This approach provides enough information for parsing any JSON data and makes it possible to use zero-copy techniques.

  1. INSTALL

To clone the repository you should have mercurial installed. Just run:

$ hg clone http://bitbucket.org/zserge/jsmn jsmn

Repository layout is simple: jsmn.c and jsmn.h are library files; demo.c is an example of how to use jsmn (it is also used in unit tests); test.sh is a test script. You will also find README, LICENSE and Makefile files inside.

To build the library, run make. It is also recommended to run make test. Let me know, if some tests fail.

If build was successful, you should get a libjsmn.a library. The header file you should include is called "jsmn.h".

  1. API

Token types are described by jsmntype_t:

typedef enum {

    JSMN_PRIMITIVE = 0,

    JSMN_OBJECT = 1,

    JSMN_ARRAY = 2,

    JSMN_STRING = 3

} jsmntype_t;

Note: Unlike JSON data types, primitive tokens are not divided into numbers, booleans and null, because one can easily tell the type using the first character:

  • ’t’, ‘f’ - boolean

  • ‘n’ - null

  • ’-‘, ‘0’..‘9’ - number

Token is an object of jsmntok_t type:

typedef struct {

    jsmntype_t type; /* Token type */

    int start;       /* Token start position */

    int end;         /* Token end position */

    int size;        /* Number of child (nested) tokens */

} jsmntok_t;

Note: string tokens point to the first character after the opening quote and the previous symbol before final quote. This was made to simplify string extraction from JSON data.

All job is done by jsmn_parser object. You can initialize a new parser using:

jsmn_parser parser;

 

jsmn_init(&parser);

This will initialize (or reset) the parser.

Later, you can use jsmn_parse() function to process JSON string with the parser:

jsmntok_t tokens[256];

const char *js;

int r;

 

js = ...;

r = jsmn_parse(&parser, js, strlen(js), tokens, 256);

A non-negative return value of jsmn_parse is the number of tokens actually used by the parser.

Passing NULL instead of the tokens array would not store parsing results, but instead the function will return the value of tokens needed to parse the given string. This can be useful if you don’t know yet how many tokens to allocate.

If something goes wrong, you will get a negative error returned by jsmn_parse(). Return value will be one of these:

  • JSMN_ERROR_INVAL - bad token, JSON string is corrupted

  • JSMN_ERROR_NOMEM - not enough tokens, JSON string is too large

  • JSMN_ERROR_PART - JSON string is too short, expecting more JSON data

If you get JSON_ERROR_NOMEM, you should re-allocate more tokens and calljsmn_parse once again. If you read JSON data from the stream, you can periodically call jsmn_parse and check if return value is not JSON_ERROR_PART - this will indicate the end of the JSON data.

jsmn stores the offsets inside parser structure, not pointers. It means you can use realloc() to get more tokens, or reallocated your js string when more data arrives.

  1. NON-STRICT MODE

By default jsmn is working in a non-strict mode. It allows you to use it for other useful formats that JSON. In non-strict mode jsmn accepts:

  • non-quoted primitive values other than true/false/null/numbers

  • only primitive values without a root object

It means the following text will be valid for jsmn:

server: example.com

post: 80

message: "hello world"

Looks like a config file, right? And this is how you can use jsmn to parse JavaScript code:

{

    server: "example.com",

    post: 80,

    message: "hello world"

}

To switch to strict mode you should define JSMN_STRICT preprocessor variable.

  1. PARENT LINKS

In the benchmark jsmn have shown pretty good results for small objects (~4KB). But for large objects it was terribly slow. This can be fixed by storing links to the parent nodes. You will lose about 4 bytes per token, but speed will be much higher (by the way, after this little hack jsmn seems to be the fastest parser in that benchmark).

To enable parent links you should define JSMN_PARENT_LINKS before compiling jsmn.

  1. LINKS

There are several posts about jsmn around the web:

  1. OTHER INFO

This software is distributed under MIT license so feel free to integrate it in your commercial products.

©2012–2018 · Serge Zaitsev · zaitsev.serge@gmail.com

XySSL

XySSL is an open-source cryptographic library for embedded systems. It provides standard crypto block: AES, SHA-1, X.509, etc. as well as higher lever protocols: SSL v3 and TLS v1. XySSL has been ported on a number of architectures, including ARM, PowerPC, MIPS, and Motorola 68000. It’s already small memory footprint can be easily reduced to 50k for a basic SSL client or server, by modifying a single .h configuration file. XySSL is currently used in several open-source (GPL) and closed-source projects, such as Adobe's flash player.