Firefo...ficate(3pm)

πŸ“¦
version 1.63 Β· 3 versions
, in debian trixie

πŸ’– Firefox::Marionette::Certificate πŸ’–

okay bestie so this is the Firefox::Marionette::Certificate page from the User Contributed Perl Documentation β€” it's a Perl module page, filed under section 3pm, and the header abbreviates the title as Firefo...ficate(3pm) because apparently even manpage headers have to be shy about it. πŸ™ˆ


✨ VERSION ✨

Version 1.63. that's the one. πŸ’…


🌸 SYNOPSIS 🌸

like, here's the vibe of how you'd actually use it:

use Firefox::Marionette();
use v5.10;

my $firefox = Firefox::Marionette->new();
foreach my $certificate (sort { $a->display_name() cmp $b->display_name() } $firefox->certificates()) {
    if ($certificate->is_ca_cert()) {
        print 'PEM Encoded CA Certificate ' . "\n" . $firefox->certificate_as_pem($certificate) . "\n";
    }
    ...
}

no cap, that's it. you loop over your certs, you sort by display_name, you check if it's a CA cert, you print the PEM. iconic behaviour honestly. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

This module handles the implementation of a x509 Certificate from Firefox. that's literally the whole assignment. it represents a x509 Certificate that Firefox is holding, and it gives you lil accessor methods to peek at every field. it's giving "I'm just the certificate's emotional support wrapper" and we love her for it. πŸŽ€


🫢 SUBROUTINES/METHODS 🫢

common_name

returns the common name from the certificate. This can contain the domain name (or wildcard) attached to the certificate or a Certificate Authority name, such as 'VeriSign Class 3 Public Primary Certification Authority - G4'. so it's either like, *.example.com energy or full-on CA government name energy. both valid. ✨

db_key

returns a unique value for the certificate. This looks like a Base64 encoded string approximately 316 bytes long when encoded. it's the cert's social security number basically, except longer and less likely to be leaked. πŸ’€

display_name

returns the display name field, such as 'VeriSign Class 3 Public Primary Certification Authority - G4'. the name it goes by in public. main character energy fr fr.

email_address

returns the emailAddress field if supplied, otherwise it will return undef. so like, sometimes it has an email, sometimes it's just ghosting you. 😭

is_any_cert

returns a boolean value to determine if the certificate is a certificate. This can return false for old browsers that do not support this attribute (such as Firefox 31.1.0esr). okay so yes, the method that asks "is this a certificate" can say no on old browsers. is it a cert? maybe. vibe check failed. not me defending this, I'm just reporting the facts bestie. πŸ™ˆ

is_built_in_root

returns a boolean value to determine if the certificate is a built in root certificate. the OGs that ship with the browser. built different, literally. 🌈

is_ca_cert

returns a boolean value to determine if the certificate is a certificate authority certificate. the ones allowed to sign other certs. they have signing privileges and they WILL use them. πŸ’…

is_email_cert

returns a boolean value to determine if the certificate is an email certificate. for securing your emails. very demure, very mindful. πŸ“

is_server_cert

returns a boolean value to determine if the certificate is a server certificate. the classic. the one you see when you hit https://. ⭐

is_unknown_cert

returns a boolean value to determine if the certificate type is unknown. mysterious. unlabeled. we don't know her. 🧚

is_user_cert

returns a boolean value to determine if the certificate is a user certificate. it's yours, you imported it, you own it. πŸ’œ

issuer_common_name

returns the issuer common name (per RFC 5280 section 5.1.2.3 β€” <https://datatracker.ietf.org/doc/html/rfc5280#section-5.1.2.3>) from the certificate, such as 'VeriSign Class 3 Public Primary Certification Authority - G4'. this is who signed it, by their short name.

issuer_name

returns the issuer name (<https://datatracker.ietf.org/doc/html/rfc5280#section-5.1.2.3>) from the certificate, such as 'CN=VeriSign Class 3 Public Primary Certification Authority - G4,OU="(c) 2007 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US'. the full legal name, government name, all the middle names. 😭

issuer_organization

returns the issuer organisation (<https://datatracker.ietf.org/doc/html/rfc5280#section-5.1.2.3>) from the certificate, such as 'VeriSign, Inc.'. just the org. short and sweet. 🌸

issuer_organization_unit

returns the issuer organization unit (<https://datatracker.ietf.org/doc/html/rfc5280#section-5.1.2.3>) from the certificate, such as 'VeriSign Trust Network'. the department within the org. like which team at the company signed off. πŸŽ€

key_usages

returns a string describing the intended usages of the certificate, such as 'Certificate Signer'. what this cert is allowed to do when it grows up. πŸ¦‹

new

This method is intended for use exclusively by the Firefox::Marionette module. You should not need to call this method from your code. bestie. don't. this is not for you. this is the internal plumbing. you call certificates() on your Firefox::Marionette object and let it handle this. stay in your lane, respectfully. πŸ™ˆ

nickname

returns the nickname field, such as 'Builtin Object Token:VeriSign Class 3 Public Primary Certification Authority - G4'. aww it has a nickname. the cute lil alias in the cert store. πŸ₯Ί

not_valid_after

returns the not valid after (<https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.5>) time in seconds since the UNIX epoch. the expiry date, in raw epoch seconds, because we're Unix girlies and we count from 1970. ⏰

not_valid_before

returns the not valid before (<https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.5>) time in seconds since the UNIX epoch. the birthday. also in epoch seconds. symmetry slay. πŸ’–

organization

returns the organization field, such as 'VeriSign, Inc.'. the O field, the subject side this time.

organizational_unit

returns the organization unit field, such as 'VeriSign Trust Network'. the OU field on the subject side. 🌈

serial_number

returns the serial number (<https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.2>) of the certificate, such as '2F:80:FE:23:8C:0E:22:0F:48:67:12:28:91:87:AC:B3'. the cert's unique ID within its issuer. colons and everything. very hexadecimal, very demure. ⭐

sha1_fingerprint

returns the sha1Fingerprint field, such as '22:D5:D8:DF:8F:02:31:D1:8D:F7:9D:B7:CF:8A:2D:64:C9:3F:6C:3A'. the classic fingerprint. still iconic even if sha1 is kinda old news. πŸ’…

sha256_fingerprint

returns the sha256Fingerprint field, such as '69:DD:D7:EA:90:BB:57:C9:3E:13:5D:C8:5E:A6:FC:D5:48:0B:60:32:39:BD:C4:54:FC:75:8B:2A:26:CF:7F:79'. the long one. the glow-up. 64 hex chars of pure security. πŸ”₯

sha256_subject_public_key_info_digest

returns the base64 encoded sha256 digest of the subject public key info (<https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.7>) field, such as 'UZJDjsNp1+4M5x9cbbdflB779y5YRBcV6Z6rBMLIrO4='. base64 this time, not hex. it's giving ✨variety✨. it's the digest of the SPKI, which is the nerdy way of saying "the public key, packaged pretty". πŸŽ€

subject_name

returns the name from the subject (<https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6>) field, such as 'CN=VeriSign Class 3 Public Primary Certification Authority - G4,OU="(c) 2007 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US'. the subject's full government name. all the RDN bits, comma-separated, the whole ensemble. πŸ‘‘

token_name

returns a string describing the type of certificate, such as 'Builtin Object Token'. which token/cert store it lives in. where it hangs out. πŸ’œ


πŸ’€ DIAGNOSTICS πŸ’€

None.

like, literally none. no errors, no warnings, no drama. she simply does not have diagnostics. 🫢


🧚 CONFIGURATION AND ENVIRONMENT 🧚

Firefox::Marionette::Certificate requires no configuration files or environment variables.

no config files, no env vars, no .rc files hiding in your home dir. it just works. zero setup, zero notes, zero group project energy. slay. ✨


πŸ“ DEPENDENCIES πŸ“

None.

nothing. not a single one. she's self-sufficient. πŸ’…


🌈 INCOMPATIBILITIES 🌈

None reported.

nobody's filed a complaint yet bestie, so as far as we know she plays nice with everyone. 🀝


😭 BUGS AND LIMITATIONS 😭

To report a bug, or view the current list of bugs, please visit <https://github.com/david-dick/firefox-marionette/issues>

okay so if something's broken, do NOT suffer in silence β€” go to the issues page, that's the whole move. fr fr.

πŸ‘‘ AUTHOR πŸ‘‘

David Dick "<ddick@cpan.org>". the legend. the one who wrote it. give her a round of applause. πŸŽ€


Copyright (c) 2024, David Dick "<ddick@cpan.org>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See "perlartistic" in perlartistic.

so like, it's free, you can share it, you can remix it, just keep the same terms as Perl itself, and if you wanna read the fine print it's in perlartistic in perlartistic. open source bestie behaviour. 🫢


🚨 DISCLAIMER OF WARRANTY 🚨

okay bestie, this part is in ALL CAPS in the original so I'm keeping every word of it, because it's the legally-load-bearing part and I am NOT paraphrasing a warranty disclaimer, that would be a crime:

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

tldr: it's free, so it's as-is, and if it breaks, that's on you. the caps are doing the heavy lifting and they mean it. πŸ’€

and that's the whole page, bestie!! πŸŽ€ this was perl v5.40.1, dated 2025-03-16, and yes the footer is literally the same Firefo...ficate(3pm) title because the header and footer are matching. it's giving coordinated outfit. obsessed. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from