|
CryptoAuthLib
Atmel CryptoAuthentication Library
|
These methods provide convenient ways to perform certification I/O with CryptoAuth chips and perform certificate manipulation in memory. More...
Data Structures | |
| struct | atcacert_tm_utc_s |
| struct | atcacert_device_loc_s |
| struct | atcacert_cert_loc_s |
| struct | atcacert_cert_element_s |
| struct | atcacert_def_s |
| struct | atcacert_build_state_s |
Macros | |
| #define | FALSE (0) |
| #define | TRUE (1) |
| #define | ATCACERT_E_SUCCESS 0 |
| Operation completed successfully. More... | |
| #define | ATCACERT_E_ERROR 1 |
| General error. More... | |
| #define | ATCACERT_E_BAD_PARAMS 2 |
| Invalid/bad parameter passed to function. More... | |
| #define | ATCACERT_E_BUFFER_TOO_SMALL 3 |
| Supplied buffer for output is too small to hold the result. More... | |
| #define | ATCACERT_E_DECODING_ERROR 4 |
| Data being decoded/parsed has an invalid format. More... | |
| #define | ATCACERT_E_INVALID_DATE 5 |
| Date is invalid. More... | |
| #define | ATCACERT_E_UNIMPLEMENTED 6 |
| Function is unimplemented for the current configuration. More... | |
| #define | ATCACERT_E_UNEXPECTED_ELEM_SIZE 7 |
| A certificate element size was not what was expected. More... | |
| #define | ATCACERT_E_ELEM_MISSING 8 |
| The certificate element isn't defined for the certificate definition. More... | |
| #define | ATCACERT_E_ELEM_OUT_OF_BOUNDS 9 |
| Certificate element is out of bounds for the given certificate. More... | |
| #define | ATCACERT_E_BAD_CERT 10 |
| Certificate structure is bad in some way. More... | |
| #define | ATCACERT_E_WRONG_CERT_DEF 11 |
| #define | ATCACERT_E_VERIFY_FAILED 12 |
| Certificate or challenge/response verification failed. More... | |
| #define | DATEFMT_ISO8601_SEP_SIZE (20) |
| #define | DATEFMT_RFC5280_UTC_SIZE (13) |
| #define | DATEFMT_POSIX_UINT32_BE_SIZE (4) |
| #define | DATEFMT_POSIX_UINT32_LE_SIZE (4) |
| #define | DATEFMT_RFC5280_GEN_SIZE (15) |
| #define | DATEFMT_MAX_SIZE DATEFMT_ISO8601_SEP_SIZE |
Typedefs | |
| typedef struct atcacert_tm_utc_s | atcacert_tm_utc_t |
| typedef enum atcacert_date_format_e | atcacert_date_format_t |
| typedef enum atcacert_cert_type_e | atcacert_cert_type_t |
| typedef enum atcacert_cert_sn_src_e | atcacert_cert_sn_src_t |
| typedef enum atcacert_device_zone_e | atcacert_device_zone_t |
| typedef enum atcacert_std_cert_element_e | atcacert_std_cert_element_t |
| typedef struct atcacert_device_loc_s | atcacert_device_loc_t |
| typedef struct atcacert_cert_loc_s | atcacert_cert_loc_t |
| typedef struct atcacert_cert_element_s | atcacert_cert_element_t |
| typedef struct atcacert_def_s | atcacert_def_t |
| typedef struct atcacert_build_state_s | atcacert_build_state_t |
Enumerations | |
| enum | atcacert_date_format_e { DATEFMT_ISO8601_SEP, DATEFMT_RFC5280_UTC, DATEFMT_POSIX_UINT32_BE, DATEFMT_POSIX_UINT32_LE, DATEFMT_RFC5280_GEN } |
| enum | atcacert_cert_type_e { CERTTYPE_X509, CERTTYPE_CUSTOM } |
| enum | atcacert_cert_sn_src_e { SNSRC_STORED = 0x0, SNSRC_DEVICE_SN = 0x8, SNSRC_SIGNER_ID = 0x9, SNSRC_PUB_KEY_HASH = 0xA, SNSRC_DEVICE_SN_HASH = 0xB, SNSRC_PUB_KEY_HASH_POS = 0xC, SNSRC_DEVICE_SN_HASH_POS = 0xD, SNSRC_PUB_KEY_HASH_RAW = 0xE, SNSRC_DEVICE_SN_HASH_RAW = 0xF } |
| enum | atcacert_device_zone_e { DEVZONE_CONFIG = 0x00, DEVZONE_OTP = 0x01, DEVZONE_DATA = 0x02, DEVZONE_NONE = 0x07 } |
| enum | atcacert_std_cert_element_e { STDCERT_PUBLIC_KEY, STDCERT_SIGNATURE, STDCERT_ISSUE_DATE, STDCERT_EXPIRE_DATE, STDCERT_SIGNER_ID, STDCERT_CERT_SN, STDCERT_AUTH_KEY_ID, STDCERT_SUBJ_KEY_ID, STDCERT_NUM_ELEMENTS } |
Functions | |
| int | atcacert_read_cert (const atcacert_def_t *cert_def, const uint8_t ca_public_key[64], uint8_t *cert, size_t *cert_size) |
| Reads the certificate specified by the certificate definition from the ATECC508A device. More... | |
| int | atcacert_get_response (uint8_t device_private_key_slot, const uint8_t challenge[32], uint8_t response[64]) |
| Calculates the response to a challenge sent from the host. More... | |
| int | atcacert_date_enc (atcacert_date_format_t format, const atcacert_tm_utc_t *timestamp, uint8_t *formatted_date, size_t *formatted_date_size) |
| Format a timestamp according to the format type. More... | |
| int | atcacert_date_dec (atcacert_date_format_t format, const uint8_t *formatted_date, size_t formatted_date_size, atcacert_tm_utc_t *timestamp) |
| Parse a formatted timestamp according to the specified format. More... | |
| int | atcacert_date_enc_compcert (const atcacert_tm_utc_t *issue_date, uint8_t expire_years, uint8_t enc_dates[3]) |
| Encode the issue and expire dates in the format used by the compressed certificate. More... | |
| int | atcacert_date_dec_compcert (const uint8_t enc_dates[3], atcacert_date_format_t expire_date_format, atcacert_tm_utc_t *issue_date, atcacert_tm_utc_t *expire_date) |
| Decode the issue and expire dates from the format used by the compressed certificate. More... | |
| int | atcacert_date_get_max_date (atcacert_date_format_t format, atcacert_tm_utc_t *timestamp) |
| Return the maximum date available for the given format. More... | |
| int | atcacert_date_enc_iso8601_sep (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE]) |
| int | atcacert_date_dec_iso8601_sep (const uint8_t formatted_date[DATEFMT_ISO8601_SEP_SIZE], atcacert_tm_utc_t *timestamp) |
| int | atcacert_date_enc_rfc5280_utc (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE]) |
| int | atcacert_date_dec_rfc5280_utc (const uint8_t formatted_date[DATEFMT_RFC5280_UTC_SIZE], atcacert_tm_utc_t *timestamp) |
| int | atcacert_date_enc_rfc5280_gen (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE]) |
| int | atcacert_date_dec_rfc5280_gen (const uint8_t formatted_date[DATEFMT_RFC5280_GEN_SIZE], atcacert_tm_utc_t *timestamp) |
| int | atcacert_date_enc_posix_uint32_be (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE]) |
| int | atcacert_date_dec_posix_uint32_be (const uint8_t formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE], atcacert_tm_utc_t *timestamp) |
| int | atcacert_date_enc_posix_uint32_le (const atcacert_tm_utc_t *timestamp, uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE]) |
| int | atcacert_date_dec_posix_uint32_le (const uint8_t formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE], atcacert_tm_utc_t *timestamp) |
| int | atcacert_get_device_locs (const atcacert_def_t *cert_def, atcacert_device_loc_t *device_locs, size_t *device_locs_count, size_t device_locs_max_count, size_t block_size) |
| Add all the device locations required to rebuild the specified certificate (cert_def) to a device locations list. More... | |
| int | atcacert_cert_build_start (atcacert_build_state_t *build_state, const atcacert_def_t *cert_def, uint8_t *cert, size_t *cert_size, const uint8_t ca_public_key[64]) |
| Starts the certificate rebuilding process. More... | |
| int | atcacert_cert_build_process (atcacert_build_state_t *build_state, const atcacert_device_loc_t *device_loc, const uint8_t *device_data) |
| Process information read from the ATECC device. If it contains information for the certificate, it will be incorporated into the certificate. More... | |
| int | atcacert_cert_build_finish (atcacert_build_state_t *build_state) |
| Completes any final certificate processing required after all data from the device has been incorporated. More... | |
| int | atcacert_get_device_data (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, const atcacert_device_loc_t *device_loc, uint8_t *device_data) |
| Gets the dynamic data that would be saved to the specified device location. This function is primarily used to break down a full certificate into the dynamic components to be saved to a device. More... | |
| int | atcacert_set_subj_public_key (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const uint8_t subj_public_key[64]) |
| Sets the subject public key and subject key ID in a certificate. More... | |
| int | atcacert_get_subj_public_key (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t subj_public_key[64]) |
| Gets the subject public key from a certificate. More... | |
| int | atcacert_get_subj_key_id (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t subj_key_id[20]) |
| Gets the subject key ID from a certificate. More... | |
| int | atcacert_set_signature (const atcacert_def_t *cert_def, uint8_t *cert, size_t *cert_size, size_t max_cert_size, const uint8_t signature[64]) |
| Sets the signature in a certificate. This may alter the size of the X.509 certificates. More... | |
| int | atcacert_get_signature (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t signature[64]) |
| Gets the signature from a certificate. More... | |
| int | atcacert_set_issue_date (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const atcacert_tm_utc_t *timestamp) |
| Sets the issue date (notBefore) in a certificate. Will be formatted according to the date format specified in the certificate definition. More... | |
| int | atcacert_get_issue_date (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, atcacert_tm_utc_t *timestamp) |
| Gets the issue date from a certificate. Will be parsed according to the date format specified in the certificate definition. More... | |
| int | atcacert_set_expire_date (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const atcacert_tm_utc_t *timestamp) |
| Sets the expire date (notAfter) in a certificate. Will be formatted according to the date format specified in the certificate definition. More... | |
| int | atcacert_get_expire_date (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, atcacert_tm_utc_t *timestamp) |
| Gets the expire date from a certificate. Will be parsed according to the date format specified in the certificate definition. More... | |
| int | atcacert_set_signer_id (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const uint8_t signer_id[2]) |
| Sets the signer ID in a certificate. Will be formatted as 4 upper-case hex digits. More... | |
| int | atcacert_get_signer_id (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t signer_id[2]) |
| Gets the signer ID from a certificate. Will be parsed as 4 upper-case hex digits. More... | |
| int | atcacert_set_cert_sn (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const uint8_t *cert_sn, size_t cert_sn_size) |
| Sets the certificate serial number in a certificate. More... | |
| int | atcacert_gen_cert_sn (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const uint8_t device_sn[9]) |
| Sets the certificate serial number by generating it from other information in the certificate using the scheme specified by sn_source in cert_def. See the. More... | |
| int | atcacert_get_cert_sn (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t *cert_sn, size_t *cert_sn_size) |
| Gets the certificate serial number from a certificate. More... | |
| int | atcacert_set_auth_key_id (const atcacert_def_t *cert_def, uint8_t *cert, size_t cert_size, const uint8_t auth_public_key[64]) |
| Sets the authority key ID in a certificate. Note that this takes the actual public key creates a key ID from it. More... | |
| int | atcacert_get_auth_key_id (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t auth_key_id[20]) |
| Gets the authority key ID from a certificate. More... | |
| int | atcacert_set_comp_cert (const atcacert_def_t *cert_def, uint8_t *cert, size_t *cert_size, size_t max_cert_size, const uint8_t comp_cert[72]) |
| Sets the signature, issue date, expire date, and signer ID found in the compressed certificate. This also checks fields common between the cert_def and the compressed certificate to make sure they match. More... | |
| int | atcacert_get_comp_cert (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t comp_cert[72]) |
| Generate the compressed certificate for the given certificate. More... | |
| int | atcacert_get_tbs (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, const uint8_t **tbs, size_t *tbs_size) |
| Get a pointer to the TBS data in a certificate. More... | |
| int | atcacert_get_tbs_digest (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, uint8_t tbs_digest[32]) |
| Get the SHA256 digest of certificate's TBS data. More... | |
| int | atcacert_set_cert_element (const atcacert_cert_loc_t *cert_loc, uint8_t *cert, size_t cert_size, const uint8_t *data, size_t data_size) |
| Sets an element in a certificate. The data_size must match the size in cert_loc. More... | |
| int | atcacert_get_cert_element (const atcacert_cert_loc_t *cert_loc, const uint8_t *cert, size_t cert_size, uint8_t *data, size_t data_size) |
| Gets an element from a certificate. More... | |
| int | atcacert_get_key_id (const uint8_t public_key[64], uint8_t key_id[20]) |
| Calculates the key ID for a given public ECC P256 key. More... | |
| int | atcacert_merge_device_loc (atcacert_device_loc_t *device_locs, size_t *device_locs_count, size_t device_locs_max_count, const atcacert_device_loc_t *device_loc, size_t block_size) |
| Merge a new device location into a list of device locations. If the new location overlaps with an existing location, the existing one will be modified to encompass both. Otherwise the new location is appended to the end of the list. More... | |
| int | atcacert_is_device_loc_overlap (const atcacert_device_loc_t *device_loc1, const atcacert_device_loc_t *device_loc2) |
| void | atcacert_public_key_add_padding (const uint8_t raw_key[64], uint8_t padded_key[72]) |
| Takes a raw P256 ECC public key and converts it to the padded version used by ATECC devices. Input and output buffers can point to the same location to do an in-place transform. More... | |
| void | atcacert_public_key_remove_padding (const uint8_t padded_key[72], uint8_t raw_key[64]) |
| Takes a padded public key used by ATECC devices and converts it to a raw P256 ECC public key. Input and output buffers can point to the same location to do an in-place transform. More... | |
| int | atcacert_der_enc_length (uint32_t length, uint8_t *der_length, size_t *der_length_size) |
| Encode a length in DER format. More... | |
| int | atcacert_der_dec_length (const uint8_t *der_length, size_t *der_length_size, uint32_t *length) |
| Decode a DER format length. More... | |
| int | atcacert_der_enc_integer (const uint8_t *int_data, size_t int_data_size, uint8_t is_unsigned, uint8_t *der_int, size_t *der_int_size) |
| Encode an ASN.1 integer in DER format, including tag and length fields. More... | |
| int | atcacert_der_dec_integer (const uint8_t *der_int, size_t *der_int_size, uint8_t *int_data, size_t *int_data_size) |
| Decode an ASN.1 DER encoded integer. More... | |
| int | atcacert_der_enc_ecdsa_sig_value (const uint8_t raw_sig[64], uint8_t *der_sig, size_t *der_sig_size) |
| Formats a raw ECDSA P256 signature in the DER encoding found in X.509 certificates. More... | |
| int | atcacert_der_dec_ecdsa_sig_value (const uint8_t *der_sig, size_t *der_sig_size, uint8_t raw_sig[64]) |
| Parses an ECDSA P256 signature in the DER encoding as found in X.509 certificates. More... | |
| int | atcacert_verify_cert_hw (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, const uint8_t ca_public_key[64]) |
| Verify a certificate against its certificate authority's public key using the host's ATECC device for crypto functions. More... | |
| int | atcacert_gen_challenge_hw (uint8_t challenge[32]) |
| Generate a random challenge to be sent to the client using the RNG on the host's ATECC device. More... | |
| int | atcacert_verify_response_hw (const uint8_t device_public_key[64], const uint8_t challenge[32], const uint8_t response[64]) |
| Verify a client's response to a challenge using the host's ATECC device for crypto functions. More... | |
| int | atcacert_verify_cert_sw (const atcacert_def_t *cert_def, const uint8_t *cert, size_t cert_size, const uint8_t ca_public_key[64]) |
| Verify a certificate against its certificate authority's public key using software crypto functions. More... | |
| int | atcacert_gen_challenge_sw (uint8_t challenge[32]) |
| Generate a random challenge to be sent to the client using a software PRNG. More... | |
| int | atcacert_verify_response_sw (const uint8_t device_public_key[64], const uint8_t challenge[32], const uint8_t response[64]) |
| Verify a client's response to a challenge using software crypto functions. More... | |
These methods provide convenient ways to perform certification I/O with CryptoAuth chips and perform certificate manipulation in memory.
| #define ATCACERT_E_BAD_CERT 10 |
Certificate structure is bad in some way.
| #define ATCACERT_E_BAD_PARAMS 2 |
Invalid/bad parameter passed to function.
| #define ATCACERT_E_BUFFER_TOO_SMALL 3 |
Supplied buffer for output is too small to hold the result.
| #define ATCACERT_E_DECODING_ERROR 4 |
Data being decoded/parsed has an invalid format.
| #define ATCACERT_E_ELEM_MISSING 8 |
The certificate element isn't defined for the certificate definition.
| #define ATCACERT_E_ELEM_OUT_OF_BOUNDS 9 |
Certificate element is out of bounds for the given certificate.
| #define ATCACERT_E_ERROR 1 |
General error.
| #define ATCACERT_E_INVALID_DATE 5 |
Date is invalid.
| #define ATCACERT_E_SUCCESS 0 |
Operation completed successfully.
| #define ATCACERT_E_UNEXPECTED_ELEM_SIZE 7 |
A certificate element size was not what was expected.
| #define ATCACERT_E_UNIMPLEMENTED 6 |
Function is unimplemented for the current configuration.
| #define ATCACERT_E_VERIFY_FAILED 12 |
Certificate or challenge/response verification failed.
| #define ATCACERT_E_WRONG_CERT_DEF 11 |
| #define DATEFMT_ISO8601_SEP_SIZE (20) |
| #define DATEFMT_MAX_SIZE DATEFMT_ISO8601_SEP_SIZE |
| #define DATEFMT_POSIX_UINT32_BE_SIZE (4) |
| #define DATEFMT_POSIX_UINT32_LE_SIZE (4) |
| #define DATEFMT_RFC5280_GEN_SIZE (15) |
| #define DATEFMT_RFC5280_UTC_SIZE (13) |
| #define FALSE (0) |
| #define TRUE (1) |
| typedef struct atcacert_build_state_s atcacert_build_state_t |
Tracks the state of a certificate as it's being rebuilt from device information.
| typedef struct atcacert_cert_element_s atcacert_cert_element_t |
Defines a generic dynamic element for a certificate including the device and template locations.
| typedef struct atcacert_cert_loc_s atcacert_cert_loc_t |
Defines a chunk of data in a certificate template.
| typedef enum atcacert_cert_sn_src_e atcacert_cert_sn_src_t |
Sources for the certificate serial number.
| typedef enum atcacert_cert_type_e atcacert_cert_type_t |
Types of certificates.
| typedef enum atcacert_date_format_e atcacert_date_format_t |
Date formats.
| typedef struct atcacert_def_s atcacert_def_t |
Defines a certificate and all the pieces to work with it.
If any of the standard certificate elements (std_cert_elements) are not a part of the certificate definition, set their count to 0 to indicate their absence.
| typedef struct atcacert_device_loc_s atcacert_device_loc_t |
Defines a chunk of data in an ATECC device.
| typedef enum atcacert_device_zone_e atcacert_device_zone_t |
ATECC device zones. The values match the Zone Encodings as specified in the datasheet.
| typedef enum atcacert_std_cert_element_e atcacert_std_cert_element_t |
Standard dynamic certificate elements.
| typedef struct atcacert_tm_utc_s atcacert_tm_utc_t |
Holds a broken-down date in UTC. Mimics atcacert_tm_utc_t from time.h.
Sources for the certificate serial number.
| enum atcacert_cert_type_e |
Date formats.
| int atcacert_cert_build_finish | ( | atcacert_build_state_t * | build_state | ) |
Completes any final certificate processing required after all data from the device has been incorporated.
The final certificate and its size in bytes are contained in the cert and cert_size elements of the build_state structure. This will be the same buffers as supplied to the atcacert_cert_build_start function at the beginning of the certificate rebuilding process.
| [in] | build_state | Current certificate build state. |
| int atcacert_cert_build_process | ( | atcacert_build_state_t * | build_state, |
| const atcacert_device_loc_t * | device_loc, | ||
| const uint8_t * | device_data | ||
| ) |
Process information read from the ATECC device. If it contains information for the certificate, it will be incorporated into the certificate.
| [in] | build_state | Current certificate building state. |
| [in] | device_loc | Device location structure describing where on the device the following data came from. |
| [in] | device_data | Actual data from the device. It should represent the offset and byte count specified in the device_loc parameter. |
| int atcacert_cert_build_start | ( | atcacert_build_state_t * | build_state, |
| const atcacert_def_t * | cert_def, | ||
| uint8_t * | cert, | ||
| size_t * | cert_size, | ||
| const uint8_t | ca_public_key[64] | ||
| ) |
Starts the certificate rebuilding process.
| [out] | build_state | Structure is initialized to start the certificate building process. Will be passed to the other certificate building functions. |
| [in] | cert_def | Certificate definition for the certificate being built. |
| [in] | cert | Buffer to contain the rebuilt certificate. |
| [in] | cert_size | As input, the size of the cert buffer in bytes. This value will be adjusted to the current/final size of the certificate through the building process. |
| [in] | ca_public_key | ECC P256 public key of the certificate authority (issuer) for the certificate being built. |
| int atcacert_date_dec | ( | atcacert_date_format_t | format, |
| const uint8_t * | formatted_date, | ||
| size_t | formatted_date_size, | ||
| atcacert_tm_utc_t * | timestamp | ||
| ) |
Parse a formatted timestamp according to the specified format.
| [in] | format | Format to parse the formatted date as. |
| [in] | formatted_date | Formatted date to be parsed. |
| [in] | formatted_date_size | Size of the formatted date in bytes. |
| [out] | timestamp | Parsed timestamp is returned here. |
| int atcacert_date_dec_compcert | ( | const uint8_t | enc_dates[3], |
| atcacert_date_format_t | expire_date_format, | ||
| atcacert_tm_utc_t * | issue_date, | ||
| atcacert_tm_utc_t * | expire_date | ||
| ) |
Decode the issue and expire dates from the format used by the compressed certificate.
| [in] | enc_dates | Encoded date from the compressed certificate. 3 bytes. |
| [in] | expire_date_format | Expire date format. Only used to determine max date when no expiration date is specified by the encoded date. |
| [out] | issue_date | Decoded issue date is returned here. |
| [out] | expire_date | Decoded expire date is returned here. If there is no expiration date, the expire date will be set to a maximum value for the given expire_date_format. |
| int atcacert_date_dec_iso8601_sep | ( | const uint8_t | formatted_date[DATEFMT_ISO8601_SEP_SIZE], |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
| int atcacert_date_dec_posix_uint32_be | ( | const uint8_t | formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE], |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
| int atcacert_date_dec_posix_uint32_le | ( | const uint8_t | formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE], |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
| int atcacert_date_dec_rfc5280_gen | ( | const uint8_t | formatted_date[DATEFMT_RFC5280_GEN_SIZE], |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
| int atcacert_date_dec_rfc5280_utc | ( | const uint8_t | formatted_date[DATEFMT_RFC5280_UTC_SIZE], |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
| int atcacert_date_enc | ( | atcacert_date_format_t | format, |
| const atcacert_tm_utc_t * | timestamp, | ||
| uint8_t * | formatted_date, | ||
| size_t * | formatted_date_size | ||
| ) |
Format a timestamp according to the format type.
| [in] | format | Format to use. |
| [in] | timestamp | Timestamp to format. |
| [out] | formatted_date | Formatted date will be return in this buffer. |
| [in,out] | formatted_date_size | As input, the size of the formatted_date buffer. As output, the size of the returned formatted_date. |
| int atcacert_date_enc_compcert | ( | const atcacert_tm_utc_t * | issue_date, |
| uint8_t | expire_years, | ||
| uint8_t | enc_dates[3] | ||
| ) |
Encode the issue and expire dates in the format used by the compressed certificate.
| [in] | issue_date | Issue date to encode. Note that minutes and seconds will be ignored. |
| [in] | expire_years | Expire date is expressed as a number of years past the issue date. 0 should be used if there is no expire date. |
| [out] | enc_dates | Encoded dates for use in the compressed certificate is returned here. 3 bytes. |
| int atcacert_date_enc_iso8601_sep | ( | const atcacert_tm_utc_t * | timestamp, |
| uint8_t | formatted_date[DATEFMT_ISO8601_SEP_SIZE] | ||
| ) |
| int atcacert_date_enc_posix_uint32_be | ( | const atcacert_tm_utc_t * | timestamp, |
| uint8_t | formatted_date[DATEFMT_POSIX_UINT32_BE_SIZE] | ||
| ) |
| int atcacert_date_enc_posix_uint32_le | ( | const atcacert_tm_utc_t * | timestamp, |
| uint8_t | formatted_date[DATEFMT_POSIX_UINT32_LE_SIZE] | ||
| ) |
| int atcacert_date_enc_rfc5280_gen | ( | const atcacert_tm_utc_t * | timestamp, |
| uint8_t | formatted_date[DATEFMT_RFC5280_GEN_SIZE] | ||
| ) |
| int atcacert_date_enc_rfc5280_utc | ( | const atcacert_tm_utc_t * | timestamp, |
| uint8_t | formatted_date[DATEFMT_RFC5280_UTC_SIZE] | ||
| ) |
| int atcacert_date_get_max_date | ( | atcacert_date_format_t | format, |
| atcacert_tm_utc_t * | timestamp | ||
| ) |
Return the maximum date available for the given format.
| [in] | format | Format to get the max date for. |
| [out] | timestamp | Max date is returned here. |
| int atcacert_der_dec_ecdsa_sig_value | ( | const uint8_t * | der_sig, |
| size_t * | der_sig_size, | ||
| uint8_t | raw_sig[64] | ||
| ) |
Parses an ECDSA P256 signature in the DER encoding as found in X.509 certificates.
This will parse the DER encoding of the signatureValue field as found in an X.509 certificate (RFC 5280). x509_sig should include the tag, length, and value. The value of the signatureValue is the DER encoding of the ECDSA-Sig-Value as specified by RFC 5480 and SECG SEC1.
| [in] | der_sig | X.509 format signature (TLV of signatureValue) to be parsed. |
| [in,out] | der_sig_size | As input, size of the der_sig buffer in bytes. As output, size of the DER x.509 signature parsed from the buffer. |
| [out] | raw_sig | Parsed P256 ECDSA signature will be returned in this buffer. Formatted as R and S integers concatenated together. 64 bytes. |
| int atcacert_der_dec_integer | ( | const uint8_t * | der_int, |
| size_t * | der_int_size, | ||
| uint8_t * | int_data, | ||
| size_t * | int_data_size | ||
| ) |
Decode an ASN.1 DER encoded integer.
X.680 (http://www.itu.int/rec/T-REC-X.680/en) section 19.8, for tag value X.690 (http://www.itu.int/rec/T-REC-X.690/en) section 8.3, for encoding
| [in] | der_int | DER encoded ASN.1 integer, including the tag and length fields. |
| [in,out] | der_int_size | As input, the size of the der_int buffer in bytes. As output, the size of the DER integer decoded in bytes. |
| [out] | int_data | Decode integer is returned in this buffer in a signed big-endian format. |
| [in,out] | int_data_size | As input, the size of int_data in bytes. As output, the size of the decoded integer in bytes. |
| int atcacert_der_dec_length | ( | const uint8_t * | der_length, |
| size_t * | der_length_size, | ||
| uint32_t * | length | ||
| ) |
Decode a DER format length.
X.690 (http://www.itu.int/rec/T-REC-X.690/en) section 8.1.3, for encoding
| [in] | der_length | DER encoded length. |
| [in,out] | der_length_size | As input, the size of the der_length buffer in bytes. As output, the size of the DER encoded length that was decoded. |
| [out] | length | Decoded length is returned here. |
| int atcacert_der_enc_ecdsa_sig_value | ( | const uint8_t | raw_sig[64], |
| uint8_t * | der_sig, | ||
| size_t * | der_sig_size | ||
| ) |
Formats a raw ECDSA P256 signature in the DER encoding found in X.509 certificates.
This will return the DER encoding of the signatureValue field as found in an X.509 certificate (RFC 5280). This include the tag, length, and value. The value of the signatureValue is the DER encoding of the ECDSA-Sig-Value as specified by RFC 5480 and SECG SEC1.
| [in] | raw_sig | P256 ECDSA signature to be formatted. Input format is R and S integers concatenated together. 64 bytes. |
| [out] | der_sig | X.509 format signature (TLV of signatureValue) will be returned in this buffer. |
| [in,out] | der_sig_size | As input, the size of the x509_sig buffer in bytes. As output, the size of the returned X.509 signature in bytes. |
| int atcacert_der_enc_integer | ( | const uint8_t * | int_data, |
| size_t | int_data_size, | ||
| uint8_t | is_unsigned, | ||
| uint8_t * | der_int, | ||
| size_t * | der_int_size | ||
| ) |
Encode an ASN.1 integer in DER format, including tag and length fields.
X.680 (http://www.itu.int/rec/T-REC-X.680/en) section 19.8, for tag value X.690 (http://www.itu.int/rec/T-REC-X.690/en) section 8.3, for encoding
| [in] | int_data | Raw integer in big-endian format. |
| [in] | int_data_size | Size of the raw integer in bytes. |
| [in] | is_unsigned | Indicate whether the input integer should be treated as unsigned. |
| [out] | der_int | DER encoded integer is returned in this buffer. |
| [in,out] | der_int_size | As input, the size of the der_int buffer in bytes. As output, the size of the DER integer returned in bytes. |
| int atcacert_der_enc_length | ( | uint32_t | length, |
| uint8_t * | der_length, | ||
| size_t * | der_length_size | ||
| ) |
Encode a length in DER format.
X.690 (http://www.itu.int/rec/T-REC-X.690/en) section 8.1.3, for encoding
| [in] | length | Length to be encoded. |
| [out] | der_length | DER encoded length will returned in this buffer. |
| [in,out] | der_length_size | As input, size of der_length buffer in bytes. As output, the size of the DER length encoding in bytes. |
| int atcacert_gen_cert_sn | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | device_sn[9] | ||
| ) |
Sets the certificate serial number by generating it from other information in the certificate using the scheme specified by sn_source in cert_def. See the.
This method requires certain elements in the certificate be set properly as they're used for generating the serial number. See atcacert_cert_sn_src_t for what elements should be set in the certificate beforehand. If the sn_source is set to SNSRC_STORED, the function will return ATCACERT_E_SUCCESS without making any changes to the certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | device_sn | Device serial number, only used if required by the sn_source scheme. Can be set to NULL, if not required. |
| int atcacert_gen_challenge_hw | ( | uint8_t | challenge[32] | ) |
Generate a random challenge to be sent to the client using the RNG on the host's ATECC device.
| [out] | challenge | Random challenge is return here. 32 bytes. |
| int atcacert_gen_challenge_sw | ( | uint8_t | challenge[32] | ) |
Generate a random challenge to be sent to the client using a software PRNG.
| [out] | challenge | Random challenge is return here. 32 bytes. |
| int atcacert_get_auth_key_id | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | auth_key_id[20] | ||
| ) |
Gets the authority key ID from a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | auth_key_id | Authority key ID is returned in this buffer. 20 bytes. |
| int atcacert_get_cert_element | ( | const atcacert_cert_loc_t * | cert_loc, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t * | data, | ||
| size_t | data_size | ||
| ) |
Gets an element from a certificate.
| [in] | cert_loc | Certificate location for this element. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | data | Element data will be returned in this buffer. This buffer must be large enough to hold cert_loc.count bytes. |
| [in] | data_size | Expected size of the cert element data. |
| int atcacert_get_cert_sn | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t * | cert_sn, | ||
| size_t * | cert_sn_size | ||
| ) |
Gets the certificate serial number from a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | cert_sn | Certificate SN will be returned in this buffer. |
| [in,out] | cert_sn_size | As input, the size of the cert_sn buffer. As output, the size of the certificate SN (cert_sn) in bytes. |
| int atcacert_get_comp_cert | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | comp_cert[72] | ||
| ) |
Generate the compressed certificate for the given certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to generate the compressed certificate for. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | comp_cert | Compressed certificate is returned in this buffer. 72 bytes. |
| int atcacert_get_device_data | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const atcacert_device_loc_t * | device_loc, | ||
| uint8_t * | device_data | ||
| ) |
Gets the dynamic data that would be saved to the specified device location. This function is primarily used to break down a full certificate into the dynamic components to be saved to a device.
The atcacert_add_device_locs function can be used to generate a list of device locations a particular certificate definition requires.
| [in] | cert_def | Certificate definition for the certificate we're getting data from. |
| [in] | cert | Certificate to get the device data from. |
| [in] | cert_size | Size of the certificate in bytes. |
| [in] | device_loc | Device location to request data for. |
| [out] | device_data | Buffer that represents the device data in device_loc. Required to be at least device_loc.count in size. |
| int atcacert_get_device_locs | ( | const atcacert_def_t * | cert_def, |
| atcacert_device_loc_t * | device_locs, | ||
| size_t * | device_locs_count, | ||
| size_t | device_locs_max_count, | ||
| size_t | block_size | ||
| ) |
Add all the device locations required to rebuild the specified certificate (cert_def) to a device locations list.
The block_size parameter will adjust all added device locations to have a offset and count that aligns with that block size. This allows one to generate a list of device locations that matches specific read or write semantics (e.g. 4 byte or 32 byte reads).
| [in] | cert_def | Certificate definition containing all the device locations to add to the list. |
| [in,out] | device_locs | List of device locations to add to. |
| [in,out] | device_locs_count | As input, existing size of the device locations list. As output, the new size of the device locations list. |
| [in] | device_locs_max_count | Maximum number of elements device_locs can hold. |
| [in] | block_size | Block size to align all offsets and counts to when adding device locations. |
| int atcacert_get_expire_date | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| atcacert_tm_utc_t * | timestamp | ||
| ) |
Gets the expire date from a certificate. Will be parsed according to the date format specified in the certificate definition.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | timestamp | Expire date is returned in this structure. |
| int atcacert_get_issue_date | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| atcacert_tm_utc_t * | timestamp | ||
| ) |
Gets the issue date from a certificate. Will be parsed according to the date format specified in the certificate definition.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | timestamp | Issue date is returned in this structure. |
| int atcacert_get_key_id | ( | const uint8_t | public_key[64], |
| uint8_t | key_id[20] | ||
| ) |
Calculates the key ID for a given public ECC P256 key.
Uses method 1 for calculating the keyIdentifier as specified by RFC 5280, section <IP_ADDRESS>: (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the value of the BIT STRING subjectPublicKey (excluding the tag, length, and number of unused bits).
| [in] | public_key | ECC P256 public key to calculate key key ID for. Formatted as the X and Y integers concatenated together. 64 bytes. |
| [in] | key_id | Calculated key ID will be returned in this buffer. 20 bytes. |
| int atcacert_get_response | ( | uint8_t | device_private_key_slot, |
| const uint8_t | challenge[32], | ||
| uint8_t | response[64] | ||
| ) |
Calculates the response to a challenge sent from the host.
The challenge-response protocol is an ECDSA Sign and Verify. This performs the ECDSA Sign on the challenge and returns the signature as the response.
| [in] | device_private_key_slot | Slot number for the device's private key. This must be the same slot used to generate the public key included in the device's certificate. |
| [in] | challenge | Challenge to generate the response for. Must be 32 bytes. |
| [out] | response | Response will be returned in this buffer. 64 bytes. |
| int atcacert_get_signature | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | signature[64] | ||
| ) |
Gets the signature from a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | signature | Signature is returned in this buffer. Formatted at R and S integers concatenated together. 64 bytes. |
| int atcacert_get_signer_id | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | signer_id[2] | ||
| ) |
Gets the signer ID from a certificate. Will be parsed as 4 upper-case hex digits.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | signer_id | Signer ID will be returned in this buffer. 2 bytes. |
| int atcacert_get_subj_key_id | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | subj_key_id[20] | ||
| ) |
Gets the subject key ID from a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | subj_key_id | Subject key ID is returned in this buffer. 20 bytes. |
| int atcacert_get_subj_public_key | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | subj_public_key[64] | ||
| ) |
Gets the subject public key from a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get element from. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | subj_public_key | Subject public key is returned in this buffer. Formatted at X and Y integers concatenated together. 64 bytes. |
| int atcacert_get_tbs | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t ** | tbs, | ||
| size_t * | tbs_size | ||
| ) |
Get a pointer to the TBS data in a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get the TBS data pointer for. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | tbs | Pointer to a const pointer that will be set the start of the TBS data. |
| [out] | tbs_size | Size of the TBS data will be returned here. |
| int atcacert_get_tbs_digest | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| uint8_t | tbs_digest[32] | ||
| ) |
Get the SHA256 digest of certificate's TBS data.
| [in] | cert_def | Certificate definition for the certificate. |
| [in] | cert | Certificate to get the TBS data pointer for. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [out] | tbs_digest | TBS data digest will be returned here. 32 bytes. |
| int atcacert_is_device_loc_overlap | ( | const atcacert_device_loc_t * | device_loc1, |
| const atcacert_device_loc_t * | device_loc2 | ||
| ) |
| int atcacert_merge_device_loc | ( | atcacert_device_loc_t * | device_locs, |
| size_t * | device_locs_count, | ||
| size_t | device_locs_max_count, | ||
| const atcacert_device_loc_t * | device_loc, | ||
| size_t | block_size | ||
| ) |
Merge a new device location into a list of device locations. If the new location overlaps with an existing location, the existing one will be modified to encompass both. Otherwise the new location is appended to the end of the list.
The block_size parameter will adjust all added device locations to have an offset and count that aligns with that block size. This allows one to generate a list of device locations that matches specific read/write semantics (e.g. 4 byte or 32 byte reads). Note that this block_size only applies to the device_loc being added. Existing device locations in the list won't be modified to match the block size.
| [in,out] | device_locs | Existing device location list to merge the new device location into. |
| [in,out] | device_locs_count | As input, the existing number of items in the device_locs list. As output, the new size of the device_locs list. |
| [in] | device_locs_max_count | Maximum number of items the device_locs list can hold. |
| [in] | device_loc | New device location to be merged into the device_locs list. |
| [in] | block_size | Block size to align all offsets and counts to when adding device location. |
| void atcacert_public_key_add_padding | ( | const uint8_t | raw_key[64], |
| uint8_t | padded_key[72] | ||
| ) |
Takes a raw P256 ECC public key and converts it to the padded version used by ATECC devices. Input and output buffers can point to the same location to do an in-place transform.
| [in] | raw_key | Public key as X and Y integers concatenated together. 64 bytes. |
| [out] | padded_key | Padded key is returned in this buffer. X and Y integers are padded with 4 bytes of 0 in the MSB. 72 bytes. |
| void atcacert_public_key_remove_padding | ( | const uint8_t | padded_key[72], |
| uint8_t | raw_key[64] | ||
| ) |
Takes a padded public key used by ATECC devices and converts it to a raw P256 ECC public key. Input and output buffers can point to the same location to do an in-place transform.
| [out] | padded_key | X and Y integers are padded with 4 bytes of 0 in the MSB. 72 bytes. |
| [in] | raw_key | Raw key is returned in this buffer. Public key as X and Y integers concatenated together. 64 bytes. |
| int atcacert_read_cert | ( | const atcacert_def_t * | cert_def, |
| const uint8_t | ca_public_key[64], | ||
| uint8_t * | cert, | ||
| size_t * | cert_size | ||
| ) |
Reads the certificate specified by the certificate definition from the ATECC508A device.
This process involves reading the dynamic cert data from the device and combining it with the template found in the certificate definition.
| [in] | cert_def | Certificate definition describing where to find the dynamic certificate information on the device and how to incorporate it into the template. |
| [in] | ca_public_key | The ECC P256 public key of the certificate authority that signed this certificate. Formatted as the 32 byte X and Y integers concatenated together (64 bytes total). |
| [out] | cert | Buffer to received the certificate. |
| [in,out] | cert_size | As input, the size of the cert buffer in bytes. As output, the size of the certificate returned in cert in bytes. |
| int atcacert_set_auth_key_id | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | auth_public_key[64] | ||
| ) |
Sets the authority key ID in a certificate. Note that this takes the actual public key creates a key ID from it.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | auth_public_key | Authority public key as X and Y integers concatenated together. 64 bytes. |
| int atcacert_set_cert_element | ( | const atcacert_cert_loc_t * | cert_loc, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t * | data, | ||
| size_t | data_size | ||
| ) |
Sets an element in a certificate. The data_size must match the size in cert_loc.
| [in] | cert_loc | Certificate location for this element. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | data | Element data to insert into the certificate. Buffer must contain cert_loc.count bytes to be copied into the certificate. |
| [in] | data_size | Size of the data in bytes. |
| int atcacert_set_cert_sn | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t * | cert_sn, | ||
| size_t | cert_sn_size | ||
| ) |
Sets the certificate serial number in a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | cert_sn | Certificate serial number. |
| [in] | cert_sn_size | Size of the certificate serial number in bytes. |
| int atcacert_set_comp_cert | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t * | cert_size, | ||
| size_t | max_cert_size, | ||
| const uint8_t | comp_cert[72] | ||
| ) |
Sets the signature, issue date, expire date, and signer ID found in the compressed certificate. This also checks fields common between the cert_def and the compressed certificate to make sure they match.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in,out] | cert_size | As input, size of the certificate (cert) in bytes. As output, the new size of the certificate. |
| [in] | max_cert_size | Maximum size of the cert buffer. |
| [in] | comp_cert | Compressed certificate. 72 bytes. |
| int atcacert_set_expire_date | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const atcacert_tm_utc_t * | timestamp | ||
| ) |
Sets the expire date (notAfter) in a certificate. Will be formatted according to the date format specified in the certificate definition.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | timestamp | Expire date. |
| int atcacert_set_issue_date | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const atcacert_tm_utc_t * | timestamp | ||
| ) |
Sets the issue date (notBefore) in a certificate. Will be formatted according to the date format specified in the certificate definition.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | timestamp | Issue date. |
| int atcacert_set_signature | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t * | cert_size, | ||
| size_t | max_cert_size, | ||
| const uint8_t | signature[64] | ||
| ) |
Sets the signature in a certificate. This may alter the size of the X.509 certificates.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in,out] | cert_size | As input, size of the certificate (cert) in bytes. As output, the new size of the certificate. |
| [in] | max_cert_size | Maximum size of the cert buffer. |
| [in] | signature | Signature as R and S integers concatenated together. 64 bytes. |
| int atcacert_set_signer_id | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | signer_id[2] | ||
| ) |
Sets the signer ID in a certificate. Will be formatted as 4 upper-case hex digits.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | signer_id | Signer ID. |
| int atcacert_set_subj_public_key | ( | const atcacert_def_t * | cert_def, |
| uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | subj_public_key[64] | ||
| ) |
Sets the subject public key and subject key ID in a certificate.
| [in] | cert_def | Certificate definition for the certificate. |
| [in,out] | cert | Certificate to update. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | subj_public_key | Subject public key as X and Y integers concatenated together. 64 bytes. |
| int atcacert_verify_cert_hw | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | ca_public_key[64] | ||
| ) |
Verify a certificate against its certificate authority's public key using the host's ATECC device for crypto functions.
| [in] | cert_def | Certificate definition describing how to extract the TBS and signature components from the certificate specified. |
| [in] | cert | Certificate to verify. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | ca_public_key | The ECC P256 public key of the certificate authority that signed this certificate. Formatted as the 32 byte X and Y integers concatenated together (64 bytes total). |
| int atcacert_verify_cert_sw | ( | const atcacert_def_t * | cert_def, |
| const uint8_t * | cert, | ||
| size_t | cert_size, | ||
| const uint8_t | ca_public_key[64] | ||
| ) |
Verify a certificate against its certificate authority's public key using software crypto functions.
| [in] | cert_def | Certificate definition describing how to extract the TBS and signature components from the certificate specified. |
| [in] | cert | Certificate to verify. |
| [in] | cert_size | Size of the certificate (cert) in bytes. |
| [in] | ca_public_key | The ECC P256 public key of the certificate authority that signed this certificate. Formatted as the 32 byte X and Y integers concatenated together (64 bytes total). |
| int atcacert_verify_response_hw | ( | const uint8_t | device_public_key[64], |
| const uint8_t | challenge[32], | ||
| const uint8_t | response[64] | ||
| ) |
Verify a client's response to a challenge using the host's ATECC device for crypto functions.
The challenge-response protocol is an ECDSA Sign and Verify. This performs an ECDSA verify on the response returned by the client, verifying the client has the private key counter-part to the public key returned in its certificate.
| [in] | device_public_key | Device public key as read from its certificate. Formatted as the X and Y integers concatenated together. 64 bytes. |
| [in] | challenge | Challenge that was sent to the client. 32 bytes. |
| [in] | response | Response returned from the client to be verified. 64 bytes. |
| int atcacert_verify_response_sw | ( | const uint8_t | device_public_key[64], |
| const uint8_t | challenge[32], | ||
| const uint8_t | response[64] | ||
| ) |
Verify a client's response to a challenge using software crypto functions.
The challenge-response protocol is an ECDSA Sign and Verify. This performs an ECDSA verify on the response returned by the client, verifying the client has the private key counter-part to the public key returned in its certificate.
| [in] | device_public_key | Device public key as read from its certificate. Formatted as the X and Y integers concatenated together. 64 bytes. |
| [in] | challenge | Challenge that was sent to the client. 32 bytes. |
| [in] | response | Response returned from the client to be verified. 64 bytes. |


Main Menu
About
A creation by<EMAIL_ADDRESS>This is a personal project still in alpha phase and is not intended for public release at this time. Ideas for improvements are welcome.
Main Menu


JUST THE TICKET (M). (United Artists/NewVision) Director: Richard Wenk Stars: Andy Garcia, Andie MacDowell, Richard Bradford, Andre Blank, Irene Worth, Elizabeth Ashley, Chris Lemmon, Ron Liebman, Abe Vigoda.
This curiously bland and unsatisfying romantic comedy is something of a labour of love for co-stars Andy Garcia, who produced it through his production company, and Andie MacDowell. Garcia plays Gary Starke, a ticket scalper who operates on the streets of New York. His long suffering girl friend Linda (MacDowell) has grown impatient with his lack of commitment to their relationship and his inability to follow through in achieving his dreams. When a chance to go to Paris to pursue her career as a chef arises she is tempted to jump at the opportunity.
But Gary has pinned his hope of salvation on one last desperate roll of the dice. The Pope is coming to New York to address the faithful, and Gary is trying to get his hands on what will become the hottest ticket in town. Unfortunately, a new, better organised and more ruthless operator is muscling in on his territory, and Gary's chances of redemption are fading fast.
Just The Ticket is lumbered from the outset with an implausible scenario and a pair of central characters that just aren't likeable enough to warrant the time spent in their company.
Garcia rightfully dominates the film, and brings plenty of energy to the screen. Although a normally charismatic and charming actor, he tries hard to evince some sympathy for his shallow character. However, his performance is too mannered, and he never quite succeeds in winning the audience over. MacDowell is also rather bland in a role that gives her too few opportunities to shine. Just The Ticket never allows the two performers to develop a rapport, and this lack of chemistry eventually damns the film.
Writer and first time director Richard Wenk takes a risk by filming many crucial scenes on the crowded streets of New York. This technique brings a sense of energy and realism to the film, although far too often the passers-by can be seen gazing questioningly into the camera.
Only a very touching scene between Gary and his mentor Bennie (Richard Bradford) brings some emotional punch to this rather pedestrian and laboured effort. And the only real comic touch comes when Gary helps Linda cater a dinner for a spoiled rich matron (Irene Worth). It's all too little to salvage this patchy and dreary comedy.
Unfortunately, this is not such a hot cinematic ticket! ** greg king http://www.netau.com.au/gregking
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


RMIClassLoader
provider implementations that support preferred classes.See: Description
| Class | Description |
|---|---|
| PreferredClassLoader |
A class loader that supports preferred classes.
|
| PreferredClassProvider |
An
RMIClassLoader provider that supports preferred
classes. |
| RequireDlPermProvider |
An
RMIClassLoader provider that supports preferred
classes and enforces DownloadPermission . |
RMIClassLoader
provider implementations that support preferred classes.
A preferred class is a class that is to be loaded by a class loader without the loader delegating to its parent class loader first. Resources may also be preferred.
With a class loader that supports preferred classes, the first JAR file or other URL location from which the loader loads classes can contain a preferred list. A preferred list declares names of certain classes and other resources throughout the loader's path of URLs as being preferred or not. When the loader is asked to load a class or resource that is preferred (according to the preferred list) and the class or resource exists in the loader's path of URLs, the loader will not delegate first to its parent class loader as it otherwise would do; instead, it will attempt to load the class or resource from its own path of URLs only.
By controlling class loader delegation, preferred classes can help accomplish the following goals:
There is not a complete or definitive set of rules for when to make a class or resource preferred or not, but the following guidelines are generally advisable:
PreferredClassLoader
is a class loader
implementation that supports preferred classes, and its specification
defines the format of preferred lists.
PreferredClassProvider
is an
RMIClassLoader
provider implementation that uses
PreferredClassLoader
to support preferred classes.
RequireDlPermProvider
is a subclass of
PreferredClassProvider
that enforces DownloadPermission
.


What's happening?
For each of the past few years, California has been devastated by its worst wildfire season in modern history. Millions of acres have been destroyed, thousands of residents have been forced to relocate, and numerous lives have been lost. These tragedies have also sparked a fierce national conversation on climate change, and intense fears about the inhabitability of a warmer world.
What are the patterns in California's wildfires over time? How much is destroyed? And why is this happening?
Is it nature?
Is it climate change?
Is it us?
*Hover over any bar for insights.*
*Hover over any bar for insights.*
How do we cause wildfires?
In the summer of 2020, the world was shocked by photos of orange and smoke-filled skies emerging from California. The smoke produced by wildfires traveled far and caused widespread respiratory problems across California and the West Coast.
Wind plays a significant role in spreading smoke, and in exacerbating wildfires themselves. The map below shows current active fires and wind patterns. In general, winds above 35mph (indicated in purple) are able to accelerate the spread of fires. Are you at risk?
Who is most impacted by Californian wildfires?
We've seen that more frequent and more destructive fires are becoming the norm in California, that humans are a primary cause of wildfires, and that Hispanics are being disproportionately affected.
What can we do to help those affected?
- Donate money.
- American Red Cross
- California Community Foundation’s Wildlife Relief Fund
- California Fire Foundation
- United Way of Greater Los Angeles
- Adopt or foster a pet.
- Just as humans have been displaced by these fires, so have their pets. LA Animal Services and other California-based shelters often post calls for fosters and adopters on their Facebook pages.
- Volunteer your time and skills.
- Caring Choices is a Northern California-based nonprofit which accepts applications from volunteers with medical backgrounds or other manual and technical skills - such as data entry, radio communications, or animal care - that are needed in the wake of these disasters.
This webpage is part of a final project for CS171: Visualization at Harvard University, Fall 2020. We'd like to thank our TF mentor, Elizabeth, and the rest of the CS171 teaching staff for their guidance and support on this project.
Project By:
Katherine Deng, Anna Li, Christina Wang
Data Sources:
- US Fires Data, 1992-2015
- California Fires Data, 2013-2020
- California Fire Polygons
- California 2010s County-Level Census Data
Image Sources:
None of these images are our own. Image links are included as comments in the code.
Process Book
Video Walkthrough


THE SIEGE Review by Victory A. Marasigan http://www.gl.umbc.edu/~vmaras1/reviewsidx.html
It's a classic film scenario: What if terrorists struck on U.S. soil? The movies have long exploited the timely idea, using it like political propaganda to show off America's strength and selfless heroism. Films like the Die Hard series and True Lies have turned one of this country's biggest fears into popcorn entertainment, where the bad guy is easy to pinpoint by his foreign accent, and the good guys are defined by their snappy one-liners. The outline of Edward Zwick's much-ballyhooed The Siege appears to promise yet another flag-waving, foreigner-bashing bulletfest, but thankfully, the film is nowhere nearly that shallow.
Denzel Washington's FBI agent Anthony Hubbard is thrust into the thick of an international conflict when a bomb threat is made on a New York City bus. He gets the wheels turning on an investigation, only to discover that the CIA (personified by mysterious agent Annette Bening) has already taken the case into its own hands. After civilians are lost in a series of horrific explosions, the entire nation's eyes look toward New York, and Hubbard and his crew find themselves trying to fend off an imminent declaration of martial law. Working both with and without the CIA's go-ahead, Hubbard attempts to find out who is behind the attack before the situation really gets out of hand, and before innocent American citizens end up being sequestered like animals.
Packed with white-knuckle tension and genuine pathos, The Siege is truly an enthralling ride. Washington's acting is on target, as always; his Jack Ryan-esquie screen persona fits like a glove. Tony Shalhoub is just as good as Hubbard's partner, a family-man who finds that even he is unable to escape the racial discord brought about by the terrorist incidents.
The most jarring aspect of the film are its bombing scenes, which are executed with an authenticity that is quite uncomfortable to watch. Some are shown in explicit detail, others only in aftermath. Images like these are fodder for the world news on a nightly basis, but to see them taking place in New York City is irrepressibly unnerving. To add to the tension, the filmmakers make it abundantly clear that a terrorist bomb can go off anywhere, anytime -- even in a movie theater. Lowbrow as the film's scare tactics may be, they certainly draw us in by forcing us to realize that although the situation on the screen isn't real, it easily could be.
Of late, a great concern about the film has been its apparent racist depiction of Arabs as terrorists. But The Siege smartly pushes beyond the superficial constraints of its main plot to delve deeper into the issues of racial, religious, and cultural prejudice than most mainstream "thrillers" have before it. These issues are in fact integral to the story, and although it is blatantly preachy at times, The Siege somehow avoids making its moral ring out like self-congratulatory claptrap.
For all its merits, The Siege is not perfect. The film would have done well to explore the Arab and Muslim culture even more fully. As it stands, the film comes dangerously close to making its Arab characters more symbolic than real.
The film also suffers from some questionable characterizations. Bening is unconvincing as CIA agent Elise Kraft, inhabiting the role like a schoolteacher with a sexy-cool night personality. Bruce Willis' one-dimensionally acted turn as an army general is too obvious a foil to Washington's self-righteous Hubbard.
Does the film trivialize such real tragedies as the Oklahoma City bombing? Yes and no. On the one hand, it is quite arrogant to think that the real horror of terrorism could be evoked succinctly in a movie. Conversely, to not address tragedy in some capacity would be to dishonor those who have died.
It should be understood that The Siege is but a work of entertainment, not an attempt at a modern morality tale. That being said, it is still very likely that moviegoers will come away from the film more open-minded than when they went in.
GRADE: B
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


The bossyembassy ambassador was dressed to the nines in a brassy and classy suit that made an impressive statement about her important station. [G|D]
The flossy and glossy surfaces of the newly-manufactured jars were so fussy and exacting that you could almost see your reflection in the gassy glass. [G|D]
The sultry hussy was so messy and missy in her grassygussy that it was clear she was up to no good. [G|D]
The prissysissy strutted out of the room with a sassy and mossypussy, leaving behind her an air of perplexity and disbelief. [G|D]


{{$ctrl.apiLink}} {{$ctrl.query.name}}
{{$ctrl.query.name}}
This widget requires access to a data source you don't have access to.


Colophon
The Appendix was founded where Austin, TX; Lima, Peru; Philadephia, PA; and São Paulo, Brasil meet the Internet in the Summer of 2012.
This archive is a static site generated with Jekyll and the source is available on Github.
The supernote icons are from icon-mind on The Noun Project and are used under the Creative Commons – Attribution (CC BY 3.0) license.


RT @kittylyst: I wrote an introductory guide about #observability for people who are new to it in 2022 - https://developers.redhat.com/articles/2022/04/12/observability-2022-why-it-matters-and-how-opentelemetry-can-help - #java #o…
4/13/2022, 3:06:45 AM
Favs: 0
Retweets: 0
link


Toggle navigation
MeetPoint
About
Services
Contact
MeetPoint
Price per person
Time together
Tickets
Warsaw
150 CHF
38 hours
Book tickets!
Milano
151 CHF
50 hours
Book tickets!
Sri Lanka
251 CHF
50 hours
Book tickets!


[§159-12] License required. It shall be unlawful for any person to engage in the business of slaughtering cattle, sheep, swine, goats, horses, mules and other equines or manufacturing or processing of meat or meat products without a license as required by this part. [L 1969, c 214, pt of §1]


| Amount | Received | Released | Date Released |
|---|---|---|---|
| {{subcontract.security_bg1Amount}} | {{subcontract.security_bgReceived}} | {{subcontract.security_bg1Released}} | {{subcontract.security_bg1ReleaseDate}} |
| {{subcontract.security_bg2Amount}} | {{subcontract.security_bgReceived}} | {{subcontract.security_bg2Released}} | {{subcontract.security_bg2ReleaseDate}} |


public class Vint8 extends Object
Compatibility:
This class has been used in products that have shipped to customers, and is needed to
decode legacy data. Do not modify this class in ways that will break compatibility.
| Modifier and Type | Class and Description |
|---|---|
static class
|
Vint8.Position
Because Java lacks call-by-reference, this class boxes the decoding position, which
is initially set by the caller, and returned after decoding, incremented by the number
of bytes processed.
|
| Modifier and Type | Field and Description |
|---|---|
static int
|
MAXIMUM_BYTES_NEEDED
The maximum number of bytes needed to encode a number using
Vint8
.
|
| Modifier and Type | Method and Description |
|---|---|
static int
|
bytesNeeded
(int number)
Returns the number of bytes needed to encode
number
.
|
static int
|
decode
(byte[] bytes,
Vint8.Position
pos)
Decodes a 32-bit integer from
bytes
, beginning at offset
pos.pos
.
|
static int
|
decode
(
InputStream
in)
Decodes a 32-bit integer from bytes read from
in
.
|
static int
|
encode
(int number,
byte[] dest,
int start)
Encodes
number
into
dest
, starting at offset
start
from
the beginning of the array.
|
static void
|
encode
(int number,
OutputStream
out)
Encodes
number
to
out
.
|
public static final int MAXIMUM_BYTES_NEEDED
Vint8
.
public static int bytesNeeded(int number)
number
.
number
- The number whose encoded length is needed.
number
.
public static void encode(int number, OutputStream out) throws IOException
number
to
out
.
number
- The value to be written in encoded form, to
out
.
out
- The output stream receiving the encoded bytes.
IOException
- If there is a problem writing to
out
.
public static int encode(int number, byte[] dest, int start)
number
into
dest
, starting at offset
start
from
the beginning of the array. This method assumes
dest
is large enough to
hold the required number of bytes.
number
- The number to be encoded.
dest
- The destination array.
start
- The starting offset in the array.
public static int decode(byte[] bytes, Vint8.Position pos)
bytes
, beginning at offset
pos.pos
.
The decoded value is returned, and
pos.pos
is incremented by the number of
bytes processed.
bytes
- The byte array containing an encoded value.
pos
- On entry, the starting position in the array; on return, one greater
than the position of the last byte decoded in the call.
public static int decode( InputStream in) throws IOException
in
. Bytes are read,
one at a time, from
in
, and it is assumed they represent a 32-bit
integer encoded using this class's encoding scheme. The decoded value is
returned.
in
- The input stream containing the encoded bytes.
EOFException
- If the stream ends before a value has been decoded.
IOException


Add the CTS library and widget link to your web page:

It’s best to add this to the HEAD
element, but anywhere will work.
Anywhere in your web page, when you enclose a span
of text with the class ticker
that contains a stock symbol, it will be replaced by the stock quote.
For example, if I type the sentence:

Today Google (GOOG) announced the new Nexus 7.

It will be rendered like this:
Today Google (GOOG $740.88 ▲4.33) announced the new Nexus 7.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xalan.xslt.EnvironmentCheck
public class EnvironmentCheck
Utility class to report simple information about the environment. Simplistic reporting about certain classes found in your JVM may help answer some FAQs for simple problems.
Usage-command line:
java org.apache.xalan.xslt.EnvironmentCheck [-out outFile]
Usage-from program:
boolean environmentOK =
(new EnvironmentCheck()).checkEnvironment(yourPrintWriter);
Usage-from stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan">
<xsl:output indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="xalan:checkEnvironment()"/>
</xsl:template>
</xsl:stylesheet>
Xalan users reporting problems are encouraged to use this class to see if there are potential problems with their actual Java environment before reporting a bug. Note that you should both check from the JVM/JRE's command line as well as temporarily calling checkEnvironment() directly from your code, since the classpath may differ (especially for servlets, etc).
Also see http://xml.apache.org/xalan-j/faq.html
Note: This class is pretty simplistic: results are not necessarily definitive nor will it find all problems related to environment setup. Also, you should avoid calling this in deployed production code, both because it is quite slow and because it forces classes to get loaded.
Note: This class explicitly has very limited compile-time dependencies to enable easy compilation and usage even when Xalan, DOM/SAX/JAXP, etc. are not present.
Note: for an improved version of this utility, please see the xml-commons' project Which utility which does the same kind of thing but in a much simpler manner.
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_NOTPRESENT
Marker that a class or .jar was not found. |
static java.lang.String |
CLASS_PRESENT
Marker that a class or .jar was found. |
static java.lang.String |
ERROR
Prefixed to hash keys that signify serious problems. |
static java.lang.String |
ERROR_FOUND
Value for any error found. |
static java.lang.String |
FOUNDCLASSES
Prefixed to hash keys that signify .jars found in classpath. |
java.lang.String[] |
jarNames
Listing of common .jar files that include Xalan-related classes. |
static java.lang.String |
VERSION
Prefixed to hash keys that signify version numbers. |
static java.lang.String |
WARNING
Added to descriptions that signify potential problems. |
| Constructor Summary | |
|---|---|
EnvironmentCheck()
|
| Method Summary | |
|---|---|
void |
appendEnvironmentReport(org.w3c.dom.Node container,
org.w3c.dom.Document factory,
java.util.Hashtable h)
Stylesheet extension entrypoint: Dump a basic Xalan environment report from getEnvironmentHash() to a Node. |
boolean |
checkEnvironment(java.io.PrintWriter pw)
Programmatic entrypoint: Report on basic Java environment and CLASSPATH settings that affect Xalan. |
java.util.Hashtable |
getEnvironmentHash()
Fill a hash with basic environment settings that affect Xalan. |
static void |
main(java.lang.String[] args)
Command line runnability: checks for [-out outFilename] arg. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ERROR
public static final java.lang.String WARNING
public static final java.lang.String ERROR_FOUND
public static final java.lang.String VERSION
public static final java.lang.String FOUNDCLASSES
public static final java.lang.String CLASS_PRESENT
public static final java.lang.String CLASS_NOTPRESENT
public java.lang.String[] jarNames
| Constructor Detail |
|---|
public EnvironmentCheck()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
Command line entrypoint; Sets output and calls
checkEnvironment(PrintWriter)
.
args
- command line argspublic boolean checkEnvironment(java.io.PrintWriter pw)
Note that this class is not advanced enough to tell you everything about the environment that affects Xalan, and sometimes reports errors that will not actually affect Xalan's behavior. Currently, it very simplistically checks the JVM's environment for some basic properties and logs them out; it will report a problem if it finds a setting or .jar file that is likely to cause problems.
Advanced users can peruse the code herein to help them investigate potential environment problems found; other users may simply send the output from this tool along with any bugs they submit to help us in the debugging process.
pw
- PrintWriter to send output to; can be sent to a
file that will look similar to a Properties file; defaults
to System.out if null
getEnvironmentHash()
public java.util.Hashtable getEnvironmentHash()
Worker method called from various places.
Various system and CLASSPATH, etc. properties are put into
the hash as keys with a brief description of the current state
of that item as the value. Any serious problems will be put in
with a key that is prefixed with 'ERROR.'
so it
stands out in any resulting report; also a key with just that
constant will be set as well for any error.
Note that some legitimate cases are flaged as potential errors - namely when a developer recompiles xalan.jar on their own - and even a non-error state doesn't guaruntee that everything in the environment is correct. But this will help point out the most common classpath and system property problems that we've seen.
public void appendEnvironmentReport(org.w3c.dom.Node container, org.w3c.dom.Document factory, java.util.Hashtable h)
Copy of writeEnvironmentReport that creates a Node suitable for other processing instead of a properties-like text output.
container
- Node to append our report tofactory
- Document providing createElement, etc. servicesh
- Hash presumably from getEnvironmentHash()
for an equivalent that writes to a PrintWriter instead
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


| Created: | 6/27/2020 7:03:10 AM |
| Modified: | 6/27/2020 7:03:10 AM |
| Project: | |
| Advanced: |
| Attribute |
|
Public serial id |
|
Details:
|
|
Public integer funding_source_id |
|
Details:
|
|
Public varchar(255) description |
|
Details:
|
|
Public timestamp with time zone(0) created_at |
|
Details:
|
|
Public timestamp with time zone(0) updated_at |
|
Details:
|
|
Public varchar(255) created_by |
|
Details:
|
|
Public varchar(255) updated_by |
|
Details:
|
|
Public timestamp with time zone(0) start_date |
|
Details:
|
|
Public boolean is_service_category_required |
|
Details:
|
|
Public integer[] service_category_ids |
|
Details:
|
|
Public integer[] waiver_type_ids |
|
Details:
|
| Operation | ||
|
Public funding_source_versions_pkey( id: serial, |
||
|
Details:
<<PK>>
|
||
|
Public funding_source_versions_funding_source_id_foreign( funding_source_id: integer, |
||
|
Details:
<<FK>>
|
| Element | Source Role | Target Role |
|
«table» funding_sources Table «FK» |
Name: funding_source_versions_funding_source_id_fo... |
Name: funding_sources_pkey |
|
Details:
|
| Tag | Value |
| Owner | public |
|
Details:
|
| Property | Value |
| isFinalSpecialization: | 0 |


API Reference
This API provides a method for logging messages coming from a file descriptor such as a pipe or socket. This API MUST only be used by the Supervisor.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.


Ballarat Alstom crisis: Workers vow to rally every fortnight until state government acts
by Alex FordAlstom workers have vowed to rally every fortnight until the state government provides new on new work contracts.
At a union rally in front of Wendouree MP Juliana Addison's office, a motion was passed by the Australian Manufacturing Workers Union, Rail, Tram, and Bus Union, and the Electrical Trades Union demanding the state government "stop prevaricating" and give workers certainty about their jobs.
The resolution notes Alstom submitted a "detailed proposal" to the state government at the end of October addressing "all relevant issues" - should the state government agree, the company would commit "that all existing full-time" employees would retain their job between the end of the existing contract and 2021, when the new contract would begin.
About 60 workers, union representatives, and their supporters gathered outside Ms Addison's Lydiard Street office on Tuesday afternoon.
Ms Addison was not present, as she was away on parliamentary committee business in Melbourne.
Her staff distributed hand-signed letters thanking workers for their attendance at the rally.
"I want you to know I am well aware of the concerns and anxieties regarding the uncertainty around the future of Alstom employees here in Ballarat," she wrote.
"As a former union organiser in the steel industry and national industrial officer for the printing industry, I have a strong commitment to manufacturing jobs.
"As your local MP, I will continue to advocate for local jobs and our community, as the government continues to negotiate in good faith with Alstom."
One of the workers who handed the resolution to the office was Luke Cornish, who also spoke at the ALP's state conference on Saturday.
"It's disappointing, we're trying to get Mr Andrews to come and see us but he hasn't even contacted the shop stewards," he said.
"Who knows what's going to happen at Christmas time? There's no job security, there's no job future at the moment."
Ashley Mabbitt is an AMWU shop steward at the factory, and he said he's already begun to keep an eye out for other job opportunities.
"There's a lot of uncertainty around and it does play on a lot of blokes' minds," he said.
"Obviously, yes, we're all realists, we understand companies come and go, but we're not looking for that, we're trying to build the future here in Ballarat, build the regional jobs and make sure we keep the area strong."
State AMWU secretary Tony Mavromatis said the union supported the planned rallies, adding he hoped the next one would not be necessary.
READ MORE ON ALSTOM:
Unions to call motion at ALP state conference
Ballarat Alstom workers protest state government
Ballarat Alstom jobs still at risk, no action from state government
"I do believe we have a decent state government at the moment with good procurement policies and good regional job policies - I'm sure they will honour that, that's why we do the rallies, to make sure they do," he said.
"These contracts are never easy, but it's just been going on a little too long - we'd like to know why it's taken that long."
The state government has consistently said it is assessing the design of the X'Trapolis 2.0 submitted by Alstom, and reiterated its previous commitment to building five sets of trains in Ballarat.
The next rally planned is in two weeks at upper house MP Jaala Pulford's office on Dana Street.


Christmas bus driven by 'Gary the Rabbit' given parking ticket
The warden was unmoved by Gary the Rabbit's pleas
by Howard Lloyd, Alexander BrockFamilies were left stunned by a traffic warden's lack of festive spirit after he issued a parking ticket to Gary the Rabbit and his Christmas bus.
The Stagecoach Santa coach was being used as a grotto when it fell foul of parking restrictions near a library in Exeter on Saturday (November 16).
The driver of the bus, who was dressed as a giant rabbit, pleaded with the warden who remained unmoved.

"He tried to explain that it's a planned event but the parking officer kept saying that he's just doing his job," Gosia Bartram said.

"The bus outside library was turned into a grotto. The driver is the one dressed as a bunny.

Devon County Council said no efforts had been made to contact them in advance of the event, and 'suitable parking arrangements could have been made' had they done so.
A spokesperson said: “One of our parking enforcement officers issued a penalty charge notice (PCN) to a bus parked in an area of Rougemont Place, outside the library, where parking is not permitted.
"Unfortunately, we hadn’t received notification of this event in advance, otherwise suitable parking arrangements could have been made for the vehicle.”
The Stagecoach Santa bus is heading to Barnstaple Carnival on Thursday (November 28) and Children's Hospice South West on Thursday (December 12).
Stagecoach have been contacted for comment.
For the latest news in and around Bristol, visit and bookmark Bristol Live's homepage .


9+ years experience
Our Visualizer will perform visualization of the design or its part in a chosen style which is agreed with you.


Viewing a Document
How to view a document listed in the Documents module. Note: The Title column must be visible and the Title Link enabled to perform this task.
- In the Title column, click on the linked document title.
- The document is now viewable in either the current Web browser, a new Web browser, or it may be available for download. This will depend on your Web browser settings.
-
See "Setting the Visibility of Document Columns"
-
See "Enabling/Disabling the Title Link"


--- layout: post title: Simple Linux/BSD service monitoring script date: "2012-09-17" ---
Here's a simple script to monitor the status of a service via a normal control script such as /etc/init.d/varnishd as commonly found under Linux and BSD based systems .. it should be super simple to modify for most other types of systems, such as systemctl.
Just configure, place somewhere on the server, and set a crontab line to run it every now and then.
{{< highlight bash >}} #!/usr/bin/env bash # ----- ------------- ----- # # ----- CONFIGURATION ----- # # ----- ------------- ----- # # Path to control script (usually in rc.d or init.d) SERVICED="/usr/local/etc/rc.d/varnishd" # Who should get crash notifications<EMAIL_ADDRESS># Subject of the crash notification EMAIL_SUBJECT="${SERVICED} crash detected" # ----- ------------ ----- # # ----- SCRIPT LOGIC ----- # # ----- ------------ ----- # # Check status "${SERVICED}" status > /dev/null 2>&1 service_status=$? # Exit code will be 1 if varnish is not running if [ $service_status -eq 1 ]; then service_start_message=$("${SERVICED}" start 2>&1) host=$(uname -n) uptime=$(uptime) email_message="Service ${SERVICED} seems to have crashed on host ${host}. Uptime: ${uptime} Messages from trying to restart it: ${service_start_message} " # Send email echo "${email_message}" | mail -s"${EMAIL_SUBJECT}" "${EMAIL_RECIPIENT}" fi {{< /highlight >}}


Section 2 - Registry Parsing¶
Section 2.1 - Opening a Hive¶
Using the yarp library to open Windows registry hives using a class structure that is very portable and flexible.
Example Usage:
$ python yarp_base.py {NTUSER HIVE}
References:
Opening a Registry Hive¶
This class demonstrates how to open a registry hive file with the yarp tool. This library not only allows us to open a single offline hive, but also leverage any available transaction logs to include additional information otherwise available on the Window’s system. This class handles both the opening of the primary hive and attempted recovery of the transaction logs.
class RegistryBase():
"""Base class containing common registry parsing code. Will open a hive
and attempt recovery using available transaction logs"""
def __init__(self, reg_file):
"""Base __init__ method, responsible for opening a hive."""
self.reg_file = reg_file
self.tx_log_files = []
self.hive = None
self._open_hive()
def _open_hive(self):
"""Open a registry hive with yarp. Must be an open file object with read
permissions. Will attempt to recover the hive with transaction logs if
present.
"""
self.hive = Registry.RegistryHive(self.reg_file)
self._recover_hive()
def _recover_hive(self):
"""Search for transaction logs and attempt recovery of the hive."""
hive_path = self.hive.registry_file.file_object.name
tx_logs = RegistryHelpers.DiscoverLogFiles(hive_path)
self.tx_log_files = []
for tx_path in ['log_path', 'log1_path', 'log2_path']:
log_obj = None
if getattr(tx_logs, tx_path, None):
log_obj = open(getattr(tx_logs, tx_path), 'rb')
self.tx_log_files.append(log_obj)
self.hive.recover_auto(*self.tx_log_files)
def close(self):
"""Properly close a hive."""
self.hive = None
self.reg_file.close()
for log in self.tx_log_files:
if log:
log.close()
Section 2.2 - Parsing Hive Values¶
Using the yarp library to parse NTUSER.DAT Windows registry hives using a class structure that is very portable and flexible. Parses the MountPoints2 and TrustRecords keys for with string and binary values.
Example Usage:
$ python yarp_ntuser.py {NTUSER HIVE}
References:
Creating a Hive Specific Parser¶
Since we have a strong base class providing functionality to open hives, we can build hive specific parsing classes that are tailored to handle artifacts distinct to a single hive type. In this case we set up a class to handle NTUSER.DAT files, though could get more specific on Windows versions, etc. In this class we store a few useful details including fixed values used by other methods and metadata about the class.
def __init__(self, reg_path):
super().__init__(reg_path)
self.hive_type = 'NTUSER.DAT'
self.macro_enabled_val =<PHONE_NUMBER>
Reading Hive String Values¶
With an open hive, we can begin to parse values from a known key location within the hive. This method allows us to specify a key path and inspect each of the subkeys. For each of the subkeys, we can then get the names and data associated with each value in the key. Additionally we could - if needed - continue to recurse on subkeys here. Instead we return this cursory information for the caller to display as they wish. Since the values within MountPoints2 store string data, we don’t need to perform further parsing of the record.
def parse_mountpoints2(self):
"""Demonstration of parsing values from a key by path."""
key_path = ('Software\\Microsoft\\Windows\\CurrentVersion'
'\\Explorer\\MountPoints2')
for mp in self.hive.find_key(key_path).subkeys():
mp_data = {}
mp_data['name'] = mp.name().replace('#', '\\')
mp_data['values'] = {x.name(): x.data() for x in mp.values()}
mp_data['last_written'] = mp.last_written_timestamp()
yield mp_data
Reading Hive Binary Values¶
Similarly to our prior example, we can get a key by path. In this case we don’t have a sense of what Office versions are available in the key and have elected to iterate through each of those using the parse_office_versions() method. Using each of the versions, we then access the respective TrustRecords key. If found, we then parse the binary data (retrieved with the same .data() method) using Struct to extract a timestamp and integer marking whether a trusted macro was used. These parsed attributes are then returned to the caller to be displayed.
def parse_trustrecords(self):
"""Demonstration of parsing binary values within a key."""
trust_record_path = 'Software\\Microsoft\\Office\\{OFFICE_VERSION}' \
'\\Word\\Security\\Trusted Documents\\TrustRecords'
for office_version in self.parse_office_versions():
trust_rec_key = self.hive.find_key(
trust_record_path.format(OFFICE_VERSION=office_version))
if not trust_rec_key:
continue
for rec in trust_rec_key.values():
date_val, macro_enabled = struct.unpack('q12xI', rec.data())
ms = date_val/10.0
dt_date = datetime(1601, 1, 1) + timedelta(microseconds=ms)
yield {
'doc': rec.name(),
'dt': dt_date.isoformat(),
'macro': macro_enabled == self.macro_enabled_val
}
Docstring References¶
-
class
NTUSER
(reg_path)¶ Class to handle the parsing of the NTUSER.DAT hive.
-
parse_mountpoints2
()¶ Demonstration of parsing values from a key by path.
-
parse_office_versions
()¶ Get Office versions within an open Registry hive.
- Yields
(str) – Office version number (ie. ‘15.0’)
-
parse_trustrecords
()¶ Demonstration of parsing binary values within a key.
-


Display demo desktop application. More...
Go to the source code of this file.
Defines | |
Default exit-button appearance | |
| #define | APP_EXIT_BUTTON_SIZE_X 40 |
| Common application exit button size. | |
| #define | APP_EXIT_BUTTON_SIZE_Y 40 |
| Common application exit button size. | |
| #define | APP_EXIT_BUTTON_POS_X (gfx_get_width() - APP_EXIT_BUTTON_SIZE_X) |
| Common application exit button position. | |
| #define | APP_EXIT_BUTTON_POS_Y (gfx_get_height() - APP_EXIT_BUTTON_SIZE_Y) |
| Common application exit button position. | |
| #define | APP_EXIT_BUTTON_TEXT "X" |
| Common application exit button text. | |
Functions | |
| void | app_desktop_setup (void) |
| Setup desktop. | |
| void | app_desktop_restart (void) |
| Restart desktop. |
Display demo desktop application.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file app_desktop.h.


The Sussex Mindfulness in CAMHS SIG is a forum for professionals already involved in teaching mindfulness in health, education and social care. We meet on a regular basis to discuss and share good practice in the growing field of Mindfulness with children, young people and families.
The SIG is open to professionals locally and also nationally, as we are increasingly linking with colleagues in services across the UK, to share practice initiatives and also to develop some joint research initiatives to extend the emerging evidence base for MBCT for children and adolescents.
See also