| 
      
    | 
   
◆ oe_get_private_key_by_policy()
      
        
          | oe_result_t oe_get_private_key_by_policy  | 
          ( | 
          oe_seal_policy_t  | 
          seal_policy,  | 
         
        
           | 
           | 
          const oe_asymmetric_key_params_t *  | 
          key_params,  | 
         
        
           | 
           | 
          uint8_t **  | 
          key_buffer,  | 
         
        
           | 
           | 
          size_t *  | 
          key_buffer_size,  | 
         
        
           | 
           | 
          uint8_t **  | 
          key_info,  | 
         
        
           | 
           | 
          size_t *  | 
          key_info_size  | 
         
        
           | 
          ) | 
           |  | 
         
       
 
Returns a private key that is associated with the identity of the enclave and the specified policy.  
- Parameters
 - 
  
    | [in] | seal_policy | The policy for the identity properties used to derive the asymmetric key.  |  
    | [in] | key_params | The parameters for the asymmetric key derivation.  |  
    | [out] | key_buffer | A pointer to the buffer that on success contains the requested private key.  |  
    | [out] | key_buffer_size | On success, this contains size of key_buffer.  |  
    | [out] | key_info | Optional pointer to a buffer for the enclave-specific key information which can be used to retrieve the same key later on a newer security version.  |  
    | [out] | key_info_size | On success, this contains the size of key_info. |  
   
   
 
- Return values
 - 
  
    | OE_OK | The key was successfully requested.  |  
    | OE_INVALID_PARAMETER | At least one parameter is invalid.  |  
    | OE_OUT_OF_MEMORY | There is no memory available.  |  
    | OE_UNEXPECTED | An unexpected error happened.  |  
   
   
 
 
 
     |