Lines Matching refs:s1
232 const unsigned char *s1, *s2, *end; in mbedtls_pem_read_buffer() local
246 s1 = (unsigned char *) strstr( (const char *) data, header ); in mbedtls_pem_read_buffer()
248 if( s1 == NULL ) in mbedtls_pem_read_buffer()
253 if( s2 == NULL || s2 <= s1 ) in mbedtls_pem_read_buffer()
256 s1 += strlen( header ); in mbedtls_pem_read_buffer()
257 if( *s1 == ' ' ) s1++; in mbedtls_pem_read_buffer()
258 if( *s1 == '\r' ) s1++; in mbedtls_pem_read_buffer()
259 if( *s1 == '\n' ) s1++; in mbedtls_pem_read_buffer()
271 if( s2 - s1 >= 22 && memcmp( s1, "Proc-Type: 4,ENCRYPTED", 22 ) == 0 ) in mbedtls_pem_read_buffer()
277 s1 += 22; in mbedtls_pem_read_buffer()
278 if( *s1 == '\r' ) s1++; in mbedtls_pem_read_buffer()
279 if( *s1 == '\n' ) s1++; in mbedtls_pem_read_buffer()
284 if( s2 - s1 >= 23 && memcmp( s1, "DEK-Info: DES-EDE3-CBC,", 23 ) == 0 ) in mbedtls_pem_read_buffer()
288 s1 += 23; in mbedtls_pem_read_buffer()
289 if( s2 - s1 < 16 || pem_get_iv( s1, pem_iv, 8 ) != 0 ) in mbedtls_pem_read_buffer()
292 s1 += 16; in mbedtls_pem_read_buffer()
294 else if( s2 - s1 >= 18 && memcmp( s1, "DEK-Info: DES-CBC,", 18 ) == 0 ) in mbedtls_pem_read_buffer()
298 s1 += 18; in mbedtls_pem_read_buffer()
299 if( s2 - s1 < 16 || pem_get_iv( s1, pem_iv, 8) != 0 ) in mbedtls_pem_read_buffer()
302 s1 += 16; in mbedtls_pem_read_buffer()
307 if( s2 - s1 >= 14 && memcmp( s1, "DEK-Info: AES-", 14 ) == 0 ) in mbedtls_pem_read_buffer()
309 if( s2 - s1 < 22 ) in mbedtls_pem_read_buffer()
311 else if( memcmp( s1, "DEK-Info: AES-128-CBC,", 22 ) == 0 ) in mbedtls_pem_read_buffer()
313 else if( memcmp( s1, "DEK-Info: AES-192-CBC,", 22 ) == 0 ) in mbedtls_pem_read_buffer()
315 else if( memcmp( s1, "DEK-Info: AES-256-CBC,", 22 ) == 0 ) in mbedtls_pem_read_buffer()
320 s1 += 22; in mbedtls_pem_read_buffer()
321 if( s2 - s1 < 32 || pem_get_iv( s1, pem_iv, 16 ) != 0 ) in mbedtls_pem_read_buffer()
324 s1 += 32; in mbedtls_pem_read_buffer()
331 if( *s1 == '\r' ) s1++; in mbedtls_pem_read_buffer()
332 if( *s1 == '\n' ) s1++; in mbedtls_pem_read_buffer()
340 if( s1 >= s2 ) in mbedtls_pem_read_buffer()
343 ret = mbedtls_base64_decode( NULL, 0, &len, s1, s2 - s1 ); in mbedtls_pem_read_buffer()
351 if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) in mbedtls_pem_read_buffer()