From 63d3f7f29aecf00468025c05bc01723360d86e24 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 12 May 2016 16:13:00 -0400 Subject: p11util now uses libhal and doesn't need to touch SQL. "p11util" is now something of a misnomer, since there's no longer anything about it that's specific to PKCS #11. Probably should become a libhal utility program, eventually. --- p11_common.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 p11_common.h (limited to 'p11_common.h') diff --git a/p11_common.h b/p11_common.h new file mode 100644 index 0000000..898e087 --- /dev/null +++ b/p11_common.h @@ -0,0 +1,61 @@ +/* + * p11_common.h + * ------------ + * + * Common definitions and SQL support code for Cryptech PKCS #11 engine. + * + * We could split the functions out of this into a separate .c file, + * but there's no real point in doing so, and it's simpler to keep it + * all in one file, the build process is complex enough already. + * + * Author: Rob Austein + * Copyright (c) 2015, NORDUnet A/S + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - 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. + * + * - Neither the name of the NORDUnet 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 + * 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. + */ + +#ifndef _P11_COMMON_H_ +#define _P11_COMMON_H_ + +/* + * Placeholders for PIN length limits. Figure out real values later. + * Minimum length here is much too short, we allow it for now because + * some test programs fail if we insist on a reasonable length. + */ + +#warning Figure out PIN length limits +#define P11_MIN_PIN_LENGTH 4 +#define P11_MAX_PIN_LENGTH 4096 + +#endif /* _P11_COMMON_H_ */ + +/* + * Local variables: + * indent-tabs-mode: nil + * End: + */ -- cgit v1.2.3