aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2016-03-21Don't build position-independent code for stm32.Paul Selkirk
2016-03-21Skip tests we know are going to fail.Paul Selkirk
2016-03-16Added serial RPC transport and lots more...Paul Selkirk
2016-03-12Merge branch 'master' into rpcRob Austein
2016-03-12Disable ECDSA static-test-vectors hack, fix call to hal_get_random()Rob Austein
2016-03-12Test RPC key generation API.Rob Austein
2016-03-12Doh, helps to specify the curve.Rob Austein
2016-03-12Basic RPC ECDSA tests.Rob Austein
2016-03-11First round of debugging based on RPC pkey tests: mostly ASN.1Rob Austein
2016-03-11First step towards RPC PKEY tests. Currently RSA-only, test-vectorRob Austein
2016-03-09Tweak handling of byte swapping in software hash cores to get rid ofRob Austein
2016-03-09Optional (compile time conditional) software hash cores. At theRob Austein
2016-03-03Initial implementations of ks_get_kek(). Untested, and none of theseRob Austein
2016-02-25RPC over loopback socket, just to work out the mechanics for serialization an...Paul Selkirk
2015-12-24Fix dispatch vector names.Rob Austein
2015-12-24hal_rpc_logout_all(), hal_rpc_is_logged_in().Rob Austein
2015-12-24More work on PIN/login/logout code. Access control still missing,Rob Austein
2015-12-23RPC interface to TRNG and (incomplete) PIN code.Rob Austein
2015-12-23Software modexp() implementation didn't compile due to missing proRob Austein
2015-12-23First round of fixes for new ASN.1 and test code.Rob Austein
2015-12-22Reorder tests to put hideously slow RSA tests at the end.Rob Austein
2015-12-22Test code for ASN.1 public key functions.Rob Austein
2015-12-22Add ASN.1 support for public keys (X.509 SubjectPublicKeyInfo format).Rob Austein
2015-12-21Fix names of private key DER functions.Rob Austein
2015-12-21Pull .gitignore update from master.Rob Austein
2015-12-21Binaries missing from .gitignore make git submodule grumpy.Rob Austein
2015-12-20Use sysconf(_SC_PAGESIZE) instead of getpagesize().Rob Austein
2015-12-20Consolidating curve names broke the ASN.1 code.Rob Austein
2015-12-20Drop support for the ASN.1-based ECDSA signature format in favor ofRob Austein
2015-12-20RPC server stuff mostly written. Compiles, not yet tested. RPCRob Austein
2015-12-13Merge Paul's copyright updates.Rob Austein
2015-12-13whack copyrightsPaul Selkirk
2015-12-13Add rpc_hash.c. Convert dynamic allocator in hash.c to use privateRob Austein
2015-12-12Silence platform-dependent compiler whining: in general, when printf()Rob Austein
2015-12-11RPC API dispatch, skeleton client functions, mixed-mode handlers forRob Austein
2015-12-10First cut at public libhal RPC API.Rob Austein
2015-11-17More post-merge cleanup.Paul Selkirk
2015-11-16new test to exercise trng coresPaul Selkirk
2015-11-16remove dependency on csprngPaul Selkirk
2015-11-16harmonize ctrl and status addresses with other coresPaul Selkirk
2015-11-14Catch up with other branch merges.Paul Selkirk
2015-11-13Merge branch 'config_core_selector'Paul Selkirk
2015-11-12fix printf warnings, fix time_check calculationPaul Selkirk
2015-10-31add core probe utilityPaul Selkirk
2015-10-31add bus performance testPaul Selkirk
2015-10-31fix time calculation in test-ecdsaPaul Selkirk
2015-10-29change CFLAGS assignment to += for cross-buildingPaul Selkirk
2015-10-29Remove unused includes.Paul Selkirk
2015-10-26Use ${AR} for cross-building.Paul Selkirk
2015-10-19catch up to changes in core version numbersPaul Selkirk
ibutions 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 the author 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. * **************************************************************************** * History: * * 28.03.09 mifi First Version, based on the original syscall.c from * newlib version 1.17.0 ****************************************************************************/ /**************************************************************************** * 2015-10-29 pselkirk for cryptech: * Changed asm to __asm for c99 compatibility. * Added _exit, _kill, and _getpid from mifi's 2013 revision. ****************************************************************************/ #include <stdlib.h> #include <errno.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> /***************************************************************************/ int _read_r (struct _reent *r, int file, char * ptr, int len) { r = r; file = file; ptr = ptr; len = len; errno = EINVAL; return -1; } /***************************************************************************/ int _lseek_r (struct _reent *r, int file, int ptr, int dir) { r = r; file = file; ptr = ptr; dir = dir; return 0; } /***************************************************************************/ int _write_r (struct _reent *r, int file, char * ptr, int len) { r = r; file = file; ptr = ptr; #if 0 int index; /* For example, output string by UART */ for(index=0; index<len; index++) { if (ptr[index] == '\n') { uart_putc('\r'); } uart_putc(ptr[index]); } #endif return len; } /***************************************************************************/ int _close_r (struct _reent *r, int file) { return 0; } /***************************************************************************/ /* Register name faking - works in collusion with the linker. */ register char * stack_ptr __asm ("sp"); caddr_t _sbrk_r (struct _reent *r, int incr) { extern char end __asm ("end"); /* Defined by the linker. */ static char * heap_end; char * prev_heap_end; if (heap_end == NULL) heap_end = & end; prev_heap_end = heap_end; if (heap_end + incr > stack_ptr) { /* Some of the libstdc++-v3 tests rely upon detecting out of memory errors, so do not abort here. */ #if 0 extern void abort (void); _write (1, "_sbrk: Heap and stack collision\n", 32); abort (); #else errno = ENOMEM; return (caddr_t) -1; #endif } heap_end += incr; return (caddr_t) prev_heap_end; } /***************************************************************************/ int _fstat_r (struct _reent *r, int file, struct stat * st) { r = r; file = file; memset (st, 0, sizeof (* st)); st->st_mode = S_IFCHR; return 0; } /***************************************************************************/ int _isatty_r(struct _reent *r, int fd) { r = r; fd = fd; return 1; } /***************************************************************************/ void _exit (int a) { a = a; while(1) {}; } /***************************************************************************/ int _kill (int a, int b) { a = a; b = b; return 0; } /***************************************************************************/ int _getpid(int a) { a = a; return 0; } /***************************************************************************/ int _open(int a, int b) { a = a; b = b; return 0; } /*** EOF ***/