Revision 153c3aa6
Added by Phil Davis over 8 years ago
src/usr/local/www/system_certmanager.php | ||
---|---|---|
579 | 579 |
if (!isset($id)) { |
580 | 580 |
$section->addInput(new Form_Select( |
581 | 581 |
'method', |
582 |
'Method', |
|
582 |
'*Method',
|
|
583 | 583 |
$pconfig['method'], |
584 | 584 |
$cert_methods |
585 | 585 |
))->toggles(); |
... | ... | |
587 | 587 |
|
588 | 588 |
$section->addInput(new Form_Input( |
589 | 589 |
'descr', |
590 |
'Descriptive name', |
|
590 |
'*Descriptive name',
|
|
591 | 591 |
'text', |
592 | 592 |
($a_user && empty($pconfig['descr'])) ? $a_user[$userid]['name'] : $pconfig['descr'] |
593 | 593 |
))->addClass('toggle-existing'); |
... | ... | |
598 | 598 |
|
599 | 599 |
$section->addInput(new Form_Textarea( |
600 | 600 |
'cert', |
601 |
'Certificate data', |
|
601 |
'*Certificate data',
|
|
602 | 602 |
$pconfig['cert'] |
603 | 603 |
))->setHelp('Paste a certificate in X.509 PEM format here.'); |
604 | 604 |
|
605 | 605 |
$section->addInput(new Form_Textarea( |
606 | 606 |
'key', |
607 |
'Private key data', |
|
607 |
'*Private key data',
|
|
608 | 608 |
$pconfig['key'] |
609 | 609 |
))->setHelp('Paste a private key in X.509 PEM format here.'); |
610 | 610 |
|
... | ... | |
614 | 614 |
|
615 | 615 |
if (!$internal_ca_count) { |
616 | 616 |
$section->addInput(new Form_StaticText( |
617 |
'Certificate authority', |
|
617 |
'*Certificate authority',
|
|
618 | 618 |
gettext('No internal Certificate Authorities have been defined. '). |
619 | 619 |
gettext('An internal CA must be defined in order to create an internal certificate. '). |
620 | 620 |
'<a href="system_camanager.php?act=new&method=internal"> '. gettext("Create") .'</a>'. |
... | ... | |
632 | 632 |
|
633 | 633 |
$section->addInput(new Form_Select( |
634 | 634 |
'caref', |
635 |
'Certificate authority', |
|
635 |
'*Certificate authority',
|
|
636 | 636 |
$pconfig['caref'], |
637 | 637 |
$allCas |
638 | 638 |
)); |
... | ... | |
640 | 640 |
|
641 | 641 |
$section->addInput(new Form_Select( |
642 | 642 |
'keylen', |
643 |
'Key length', |
|
643 |
'*Key length',
|
|
644 | 644 |
$pconfig['keylen'], |
645 | 645 |
array_combine($cert_keylens, $cert_keylens) |
646 | 646 |
)); |
647 | 647 |
|
648 | 648 |
$section->addInput(new Form_Select( |
649 | 649 |
'digest_alg', |
650 |
'Digest Algorithm', |
|
650 |
'*Digest Algorithm',
|
|
651 | 651 |
$pconfig['digest_alg'], |
652 | 652 |
array_combine($openssl_digest_algs, $openssl_digest_algs) |
653 | 653 |
))->setHelp('NOTE: It is recommended to use an algorithm stronger than '. |
... | ... | |
655 | 655 |
|
656 | 656 |
$section->addInput(new Form_Select( |
657 | 657 |
'type', |
658 |
'Certificate Type', |
|
658 |
'*Certificate Type',
|
|
659 | 659 |
$pconfig['type'], |
660 | 660 |
$cert_types |
661 | 661 |
))->setHelp('Type of certificate to generate. Used for placing '. |
... | ... | |
663 | 663 |
|
664 | 664 |
$section->addInput(new Form_Input( |
665 | 665 |
'lifetime', |
666 |
'Lifetime (days)', |
|
666 |
'*Lifetime (days)',
|
|
667 | 667 |
'number', |
668 | 668 |
$pconfig['lifetime'] |
669 | 669 |
)); |
670 | 670 |
|
671 | 671 |
$section->addInput(new Form_Select( |
672 | 672 |
'dn_country', |
673 |
'Country Code', |
|
673 |
'*Country Code',
|
|
674 | 674 |
$pconfig['dn_country'], |
675 | 675 |
$dn_cc |
676 | 676 |
)); |
677 | 677 |
|
678 | 678 |
$section->addInput(new Form_Input( |
679 | 679 |
'dn_state', |
680 |
'State or Province', |
|
680 |
'*State or Province',
|
|
681 | 681 |
'text', |
682 | 682 |
$pconfig['dn_state'], |
683 | 683 |
['placeholder' => 'e.g. Texas'] |
... | ... | |
685 | 685 |
|
686 | 686 |
$section->addInput(new Form_Input( |
687 | 687 |
'dn_city', |
688 |
'City', |
|
688 |
'*City',
|
|
689 | 689 |
'text', |
690 | 690 |
$pconfig['dn_city'], |
691 | 691 |
['placeholder' => 'e.g. Austin'] |
... | ... | |
693 | 693 |
|
694 | 694 |
$section->addInput(new Form_Input( |
695 | 695 |
'dn_organization', |
696 |
'Organization', |
|
696 |
'*Organization',
|
|
697 | 697 |
'text', |
698 | 698 |
$pconfig['dn_organization'], |
699 | 699 |
['placeholder' => 'e.g. My Company Inc'] |
... | ... | |
709 | 709 |
|
710 | 710 |
$section->addInput(new Form_Input( |
711 | 711 |
'dn_email', |
712 |
'Email Address', |
|
712 |
'*Email Address',
|
|
713 | 713 |
'text', |
714 | 714 |
$pconfig['dn_email'], |
715 | 715 |
['placeholder' => 'e.g. admin@mycompany.com'] |
... | ... | |
717 | 717 |
|
718 | 718 |
$section->addInput(new Form_Input( |
719 | 719 |
'dn_commonname', |
720 |
'Common Name', |
|
720 |
'*Common Name',
|
|
721 | 721 |
'text', |
722 | 722 |
$pconfig['dn_commonname'], |
723 | 723 |
['placeholder' => 'e.g. www.example.com'] |
... | ... | |
782 | 782 |
|
783 | 783 |
$section->addInput(new Form_Select( |
784 | 784 |
'csr_keylen', |
785 |
'Key length', |
|
785 |
'*Key length',
|
|
786 | 786 |
$pconfig['csr_keylen'], |
787 | 787 |
array_combine($cert_keylens, $cert_keylens) |
788 | 788 |
)); |
789 | 789 |
|
790 | 790 |
$section->addInput(new Form_Select( |
791 | 791 |
'csr_digest_alg', |
792 |
'Digest Algorithm', |
|
792 |
'*Digest Algorithm',
|
|
793 | 793 |
$pconfig['csr_digest_alg'], |
794 | 794 |
array_combine($openssl_digest_algs, $openssl_digest_algs) |
795 | 795 |
))->setHelp('NOTE: It is recommended to use an algorithm stronger than '. |
... | ... | |
797 | 797 |
|
798 | 798 |
$section->addInput(new Form_Select( |
799 | 799 |
'csr_dn_country', |
800 |
'Country Code', |
|
800 |
'*Country Code',
|
|
801 | 801 |
$pconfig['csr_dn_country'], |
802 | 802 |
$dn_cc |
803 | 803 |
)); |
804 | 804 |
|
805 | 805 |
$section->addInput(new Form_Input( |
806 | 806 |
'csr_dn_state', |
807 |
'State or Province', |
|
807 |
'*State or Province',
|
|
808 | 808 |
'text', |
809 | 809 |
$pconfig['csr_dn_state'], |
810 | 810 |
['placeholder' => 'e.g. Texas'] |
... | ... | |
812 | 812 |
|
813 | 813 |
$section->addInput(new Form_Input( |
814 | 814 |
'csr_dn_city', |
815 |
'City', |
|
815 |
'*City',
|
|
816 | 816 |
'text', |
817 | 817 |
$pconfig['csr_dn_city'], |
818 | 818 |
['placeholder' => 'e.g. Austin'] |
... | ... | |
820 | 820 |
|
821 | 821 |
$section->addInput(new Form_Input( |
822 | 822 |
'csr_dn_organization', |
823 |
'Organization', |
|
823 |
'*Organization',
|
|
824 | 824 |
'text', |
825 | 825 |
$pconfig['csr_dn_organization'], |
826 | 826 |
['placeholder' => 'e.g. My Company Inc'] |
... | ... | |
836 | 836 |
|
837 | 837 |
$section->addInput(new Form_Input( |
838 | 838 |
'csr_dn_email', |
839 |
'Email Address', |
|
839 |
'*Email Address',
|
|
840 | 840 |
'text', |
841 | 841 |
$pconfig['csr_dn_email'], |
842 | 842 |
['placeholder' => 'e.g. admin@mycompany.com'] |
... | ... | |
844 | 844 |
|
845 | 845 |
$section->addInput(new Form_Input( |
846 | 846 |
'csr_dn_commonname', |
847 |
'Common Name', |
|
847 |
'*Common Name',
|
|
848 | 848 |
'text', |
849 | 849 |
$pconfig['csr_dn_commonname'], |
850 | 850 |
['placeholder' => 'e.g. internal-ca'] |
... | ... | |
880 | 880 |
|
881 | 881 |
$section->addInput(new Form_Select( |
882 | 882 |
'certref', |
883 |
'Existing Certificates', |
|
883 |
'*Existing Certificates',
|
|
884 | 884 |
$pconfig['certref'], |
885 | 885 |
$existCerts |
886 | 886 |
)); |
... | ... | |
896 | 896 |
|
897 | 897 |
$section->addInput(new Form_Input( |
898 | 898 |
'descr', |
899 |
'Descriptive name', |
|
899 |
'*Descriptive name',
|
|
900 | 900 |
'text', |
901 | 901 |
$pconfig['descr'] |
902 | 902 |
)); |
... | ... | |
911 | 911 |
|
912 | 912 |
$section->addInput(new Form_Textarea( |
913 | 913 |
'cert', |
914 |
'Final certificate data', |
|
914 |
'*Final certificate data',
|
|
915 | 915 |
$pconfig['cert'] |
916 | 916 |
))->setWidth(7) |
917 | 917 |
->setHelp('Paste the certificate received from the certificate authority here.'); |
Also available in: Unified diff
Required fields for System pages