XilinxProcessorIPLib/drivers/hdcp22_tx/src/xhdcp22_tx_crypt.c
int XHdcp22Tx_VerifyCertificate(const XHdcp22_Tx_CertRx* CertificatePtr,
                                const u8* KpubDcpNPtr, int KpubDcpNSize,
                                const u8* KpubDcpEPtr, int KpubDcpESize)
{
	/* Verify arguments */
	Xil_AssertNonvoid(CertificatePtr != NULL);
	Xil_AssertNonvoid(KpubDcpNPtr != NULL);
	Xil_AssertNonvoid(KpubDcpEPtr != NULL);
	Xil_AssertNonvoid(KpubDcpNSize > 0);
	Xil_AssertNonvoid(KpubDcpESize > 0);

	int Result = XST_SUCCESS;

	Result = XHdcp22Tx_RsaSignatureVerify (
				(u8 *)CertificatePtr,
                    (sizeof(XHdcp22_Tx_CertRx) - sizeof(CertificatePtr->Signature)),
				CertificatePtr->Signature,
				KpubDcpNPtr, KpubDcpNSize,
				KpubDcpEPtr, KpubDcpESize);

	return Result;
}
/*****************************************************************************/
/**
*
* This function verifies the HDCP receivers certificate.
*
* @param  CertificatePtr is a pointer to the certificate from the HDCP2.2
*         receiver.
* @param  KpubDcpNPtr is a pointer to the N-value of the certificate signature.
* @param  KpubDcpNSize is the size of the N-value of the certificates signature.
* @param  KpubDcpEPtr iis a pointer to the E-value of the certificate signature.
* @param  KpubDcpESize is the size of the E-value of the certificates signature.
*
* @return
*         - XST_SUCCESS if the certificate is valid.
*         - XST_FAILURE if the certificate is invalid.
* @note   None.
*
******************************************************************************/
This function verifies the HDCP receivers certificate.
This function verifies the HDCP receivers certificate .
int XHdcp22Tx_VerifyCertificate(const XHdcp22_Tx_CertRx* CertificatePtr,
                                const u8* KpubDcpNPtr, int KpubDcpNSize,
                                const u8* KpubDcpEPtr, int KpubDcpESize)
{
	Xil_AssertNonvoid(CertificatePtr != NULL);
	Xil_AssertNonvoid(KpubDcpNPtr != NULL);
	Xil_AssertNonvoid(KpubDcpEPtr != NULL);
	Xil_AssertNonvoid(KpubDcpNSize > 0);
	Xil_AssertNonvoid(KpubDcpESize > 0);
	int Result = XST_SUCCESS;
	Result = XHdcp22Tx_RsaSignatureVerify (
				(u8 *)CertificatePtr,
                    (sizeof(XHdcp22_Tx_CertRx) - sizeof(CertificatePtr->Signature)),
				CertificatePtr->Signature,
				KpubDcpNPtr, KpubDcpNSize,
				KpubDcpEPtr, KpubDcpESize);
	return Result;
}
int XHdcp22Tx_VerifyCertificate ( const XHdcp22_Tx_CertRx * CertificatePtr , const u8 * KpubDcpNPtr , int KpubDcpNSize , const u8 * KpubDcpEPtr , int KpubDcpESize ) { Xil_AssertNonvoid ( CertificatePtr != NULL ) ; Xil_AssertNonvoid ( KpubDcpNPtr != NULL ) ; Xil_AssertNonvoid ( KpubDcpEPtr != NULL ) ; Xil_AssertNonvoid ( KpubDcpNSize > 0 ) ; Xil_AssertNonvoid ( KpubDcpESize > 0 ) ; int Result = XST_SUCCESS ; Result = XHdcp22Tx_RsaSignatureVerify ( ( u8 * ) CertificatePtr , ( sizeof ( XHdcp22_Tx_CertRx ) - sizeof ( CertificatePtr -> Signature ) ) , CertificatePtr -> Signature , KpubDcpNPtr , KpubDcpNSize , KpubDcpEPtr , KpubDcpESize ) ; return Result ; }
This function verifies the HDCP receivers certificate.
This function verifies the HDCP receivers certificate .
/* Verify arguments */