mirror of
				https://github.com/yuzu-emu/mbedtls.git
				synced 2025-11-04 06:44:48 +00:00 
			
		
		
		
	Merge pull request #4436 from gilles-peskine-arm/error-add-2.16
Backport 2.16: Add macro to check error code additions/combinations
This commit is contained in:
		
						commit
						377f4eda27
					
				
							
								
								
									
										2
									
								
								ChangeLog.d/fix-pk-parse-key-error-code.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								ChangeLog.d/fix-pk-parse-key-error-code.txt
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
Bugfix
 | 
			
		||||
   * Fix an incorrect error code when parsing a PKCS#8 private key.
 | 
			
		||||
| 
						 | 
				
			
			@ -1070,7 +1070,7 @@ static int pk_parse_key_pkcs8_unencrypted_der(
 | 
			
		|||
        return( MBEDTLS_ERR_PK_KEY_INVALID_VERSION + ret );
 | 
			
		||||
 | 
			
		||||
    if( ( ret = pk_get_pk_alg( &p, end, &pk_alg, ¶ms ) ) != 0 )
 | 
			
		||||
        return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret );
 | 
			
		||||
        return( ret );
 | 
			
		||||
 | 
			
		||||
    if( ( ret = mbedtls_asn1_get_tag( &p, end, &len, MBEDTLS_ASN1_OCTET_STRING ) ) != 0 )
 | 
			
		||||
        return( MBEDTLS_ERR_PK_KEY_INVALID_FORMAT + ret );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue