openssl_cms_sign

(PHP 8)

openssl_cms_signSign a file

Beschreibung

openssl_cms_sign(
    string $input_filename,
    string $output_filename,
    OpenSSLCertificate|string $certificate,
    OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key,
    ?array $headers,
    int $flags = 0,
    int $encoding = OPENSSL_ENCODING_SMIME,
    ?string $untrusted_certificates_filename = null
): bool

This function signs a file with an X.509 certificate and key.

Parameter-Liste

input_filename

The name of the file to be signed.

output_filename

The name of the file to deposit the results.

certificate

The signing certificate. See Key/Certificate parameters for a list of valid values.

private_key

The key associated with certificate. See Key/Certificate parameters for a list of valid values.

headers

An array of headers to be included in S/MIME output.

flags

Flags to be passed to cms_sign().

encoding

The encoding of the output file. One of OPENSSL_ENCODING_SMIME, OPENSSL_ENCODING_DER or OPENSSL_ENCODING_PEM.

untrusted_certificates_filename

Intermediate certificates to be included in the signature.

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Beispiele

Beispiel #1 openssl_cms_sign() example

<?php

openssl_cms_sign
('input.txt''output.txt''file://cert.pem''file://privkey.pem'nullOPENSSL_CMS_BINARYOPENSSL_ENCODING_DER'chain.pem');
?>

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Schwarzes Brett/ News Script

Welcome to our community bulletin board! Stay updated with the latest news and events. (https://vancedyoutube.org/) From local happenings to globa ...

Geschrieben von dussan77 am 25.07.2024 15:38:11
Forum: PHP Developer Forum
SoundCloud to MP3

SoundCloud (https://soundcloudto.com/) to MP3 converters have gained popularity as convenient tools for downloading and converting audio from Soun ...

Geschrieben von soundcloudto am 19.07.2024 04:10:40
Forum: User pages
Suche Netzwerktechnik Großhändler

I'm currently seeking reliable wholesalers specializing in network technology. Please provide details on your range of products, pricing, and any ...

Geschrieben von dussan77 am 12.07.2024 16:54:48
Forum: Ankündigungen
Getting Database Connection Failed Error in PHP Project

Hi everyone, I’m currently working on an AI and ML-based web application using PHP, and I've hit a roadblock. I’m encountering a “Database ...

Geschrieben von Gast am 27.06.2024 11:31:32
Forum: Off-Topic Diskussionen