Lines Matching defs:length
138 /* Salt length for PVK files */
140 /* Maximum length in PVK header */
142 /* Maximum salt length */
159 int ossl_do_blob_header(const unsigned char **in, unsigned int length,
165 if (length < 16)
257 * Expected length: 20 for q + 3 components bitlen each + 24 for seed
263 * Expected length: 20 for q, priv, 2 bitlen components + 24 for seed
269 /* Expected length: 4 for 'e' + 'n' */
274 * Expected length: 4 for 'e' and 7 other components. 2
282 static void *do_b2i_key(const unsigned char **in, unsigned int length,
289 if (ossl_do_blob_header(&p, length, &magic, &bitlen, isdss, ispub) <= 0) {
293 length -= 16;
294 if (length < ossl_blob_length(bitlen, *isdss, *ispub)) {
313 EVP_PKEY *ossl_b2i(const unsigned char **in, unsigned int length, int *ispub)
316 void *key = do_b2i_key(in, length, &isdss, ispub);
325 unsigned int bitlen, magic, length;
338 length = ossl_blob_length(bitlen, isdss, *ispub);
339 if (length > BLOB_MAX_LENGTH) {
343 buf = OPENSSL_malloc(length);
349 if (BIO_read(in, buf, length) != (int)length) {
501 EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length)
505 return ossl_b2i(in, length, &ispub);
508 EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length)
512 return ossl_b2i(in, length, &ispub);
748 int ossl_do_PVK_header(const unsigned char **in, unsigned int length,
756 if (length < 20) {
761 if (length < 24) {