0, 'error' => 'Kein Server ausgewählt' ] ) ); } if ( empty( $idLong ) ){ die( json_encode( [ 'status' => 0, 'error' => 'Keine Identität ausgewählt' ] ) ); } if ( empty( $_REQUEST['participantId'] ) || empty( $_REQUEST['credential'] ) ){ die( json_encode( [ 'status' => 0, 'error' => 'Daten unvollständig: ' . var_export( $_REQUEST, TRUE ) ] ) ); } $msg = new ParTCP_Outgoing_Message( $serverLong, $idLong, 'key-renewal-permission' ); $msg->set_date(); $msg->set( 'Participant-Id', $_REQUEST['participantId'] ); $msg->set( 'Credential', hash( 'sha256', $_REQUEST['credential'] ) ); $msg->set( 'Credential-Permanence', ! empty( $_REQUEST['credential_permanence'] ) ); $response = pas_check_response( $msg->send() ); if ( is_string( $response ) ){ if ( substr( $response, 0, 2 ) == '43' ){ die( json_encode( [ 'status' => 2, 'error' => '' ] ) ); } die( json_encode( [ 'status' => 0, 'error' => $response ] ) ); } echo json_encode( [ 'status' => 1, 'error' => '' ] ); // end of file ajax/update_credential.php