Class: IControl::Management::KeyCertificate

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/management/key_certificate.rb,
lib/icontrol/management.rb

Overview

The KeyCertificate interface exposes methods that enable you to manage keys, certificates, and certificate requests. All methods in this interface are atomic operations, such that each operation involves creating a session context with the key/certificate management library, performing the required action, and cleaning up and/or destroying the session context when completed. Therefore, all operations are stateless. Note that all operations on keys, certificates, and certificate requests are performed in the directory location containing keys, certs, csr's… as structured for Apache, which is currently /config/ssl. For archiving operations, you have the option of exporting or importing archives to/from other locations. If the location is not specified, the default location of /config/ssl will be used.

Defined Under Namespace

Classes: Certificate, CertificateDetail, CertificateDetailSequence, CertificateDetailSequenceSequence, CertificateInformation, CertificateInformationSequence, CertificateRequest, CertificateRequestInformation, CertificateRequestInformationSequence, CertificateRequestSequence, CertificateSequence, CertificateType, Key, KeyInformation, KeyInformationSequence, KeySequence, KeyType, ManagementModeType, SecurityType, ValidityType, ValidityTypeSequence, X509Data, X509DataSequence

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IControl::Base

Instance Method Details

#certificate_add_file_to_bundle(opts) ⇒ Object

Adds certificates identified by "certificate_files“ to the certificate bundles, which are presumed to exist already. Each of the original certificate bundle can theoretically be a normal certificate, i.e. a certificate bundle of one. After the add operation, the bundles will contain more than one certificate.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The existing certificate bundles to which additional certificates will be added.

  • :certificate_files (String)

    The file names of the certificates to add to the bundles.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



58
59
60
61
# File 'lib/icontrol/management/key_certificate.rb', line 58

def certificate_add_file_to_bundle(opts)
  opts = check_params(opts,[:cert_ids,:certificate_files])
  super(opts)
end

#certificate_add_pem_to_bundle(opts) ⇒ Object

Adds certificates identified by "pem_data“ to the certificate bundles, which are presumed to exist already. Each of the original certificate bundle can theoretically be a normal certificate, i.e. a certificate bundle of one. After the add operation, the bundles will contain more than one certificate.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The existing certificate bundles to which additional certificates will be added.

  • :pem_data (String)

    The PEM formatted data of the certificates to add to the bundles.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



75
76
77
78
# File 'lib/icontrol/management/key_certificate.rb', line 75

def certificate_add_pem_to_bundle(opts)
  opts = check_params(opts,[:cert_ids,:pem_data])
  super(opts)
end

#certificate_bind(opts) ⇒ Object

Binds/associates this keys and certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates.

  • :key_ids (String)

    The string identifications of the keys

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



89
90
91
92
# File 'lib/icontrol/management/key_certificate.rb', line 89

def certificate_bind(opts)
  opts = check_params(opts,[:cert_ids,:key_ids])
  super(opts)
end

#certificate_bundle(opts) ⇒ CertificateDetail[]

Gets the list of all certificates bundled in the certificate files as specified by the file_names. Each file_name will contain multiple certficates. Note: only call this method when the results of get_certificate_list indicate that there are multiple certificated bundled in a particular file.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :file_names (String)

    The file names of the certificate bundles.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



377
378
379
380
# File 'lib/icontrol/management/key_certificate.rb', line 377

def certificate_bundle(opts)
  opts = check_params(opts,[:file_names])
  super(opts)
end

#certificate_check_validity(opts) ⇒ ValidityType

Gets the validity of this certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to check for validity.

  • :watermark_days (long)

    The watermarks in number of days to use in checking the validity.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



104
105
106
107
# File 'lib/icontrol/management/key_certificate.rb', line 104

def certificate_check_validity(opts)
  opts = check_params(opts,[:cert_ids,:watermark_days])
  super(opts)
end

#certificate_delete(opts) ⇒ Object

Deletes/uninstalls this certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to delete/uninstall.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



117
118
119
120
# File 'lib/icontrol/management/key_certificate.rb', line 117

def certificate_delete(opts)
  opts = check_params(opts,[:cert_ids])
  super(opts)
end

#certificate_delete_from_bundle(opts) ⇒ Object

Deletes certificates, identified by their subject's X509 data, from the certificate bundles. If the last certificate has been deleted from the bundle, the certificate file will automatically be deleted.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The existing certificate bundles from which certificates will be removed.

  • :x509_data (IControl::Management::KeyCertificate::X509Data)

    The X509 data of the subjects of the certificates to be deleted from the bundle.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



133
134
135
136
# File 'lib/icontrol/management/key_certificate.rb', line 133

def certificate_delete_from_bundle(opts)
  opts = check_params(opts,[:cert_ids,:x509_data])
  super(opts)
end

#certificate_export_to_file(opts) ⇒ Object

Exports this certificates to the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to export.

  • :file_names (String)

    The files associated with the specified certificates to export to.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



148
149
150
151
# File 'lib/icontrol/management/key_certificate.rb', line 148

def certificate_export_to_file(opts)
  opts = check_params(opts,[:cert_ids,:file_names,:overwrite])
  super(opts)
end

#certificate_export_to_pem(opts) ⇒ String

Exports this certificates to PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to export.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



162
163
164
165
# File 'lib/icontrol/management/key_certificate.rb', line 162

def certificate_export_to_pem(opts)
  opts = check_params(opts,[:cert_ids])
  super(opts)
end

#certificate_generate(opts) ⇒ Object

Generates this certificates. This assumes that each of the associated keys, having the same identification as each certificate, has already been created.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :certs (IControl::Management::KeyCertificate::Certificate)

    The certificates to generate.

  • :x509_data (IControl::Management::KeyCertificate::X509Data)

    The x509 data associated with the specified certificates.

  • :lifetime_days (long)

    The number of days the certificates will be valid.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



179
180
181
182
# File 'lib/icontrol/management/key_certificate.rb', line 179

def certificate_generate(opts)
  opts = check_params(opts,[:certs,:x509_data,:lifetime_days,:overwrite])
  super(opts)
end

#certificate_import_from_file(opts) ⇒ Object

Imports/installs this certificates from the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to import/install.

  • :file_names (String)

    The certificate files associated with the specified certificates from which to import.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



194
195
196
197
# File 'lib/icontrol/management/key_certificate.rb', line 194

def certificate_import_from_file(opts)
  opts = check_params(opts,[:cert_ids,:file_names,:overwrite])
  super(opts)
end

#certificate_import_from_pem(opts) ⇒ Object

Imports/installs this certificates from the given PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :cert_ids (String)

    The string identifications of the certificates to import/install.

  • :pem_data (String)

    The PEM-formatted data associated with the specified certificates.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



209
210
211
212
# File 'lib/icontrol/management/key_certificate.rb', line 209

def certificate_import_from_pem(opts)
  opts = check_params(opts,[:cert_ids,:pem_data,:overwrite])
  super(opts)
end

#certificate_listCertificateInformation

Gets the list of all installed certificates and their information. If there's a certificate bundle, only the first certificate in the bundle is returned, and and is_bundle flag will be set to true for the correponding bundle file name.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



391
392
393
# File 'lib/icontrol/management/key_certificate.rb', line 391

def certificate_list
  super
end

#certificate_request_delete(opts) ⇒ Object

Deletes this CSRs.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :csr_ids (String)

    The certificate requests to delete.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



222
223
224
225
# File 'lib/icontrol/management/key_certificate.rb', line 222

def certificate_request_delete(opts)
  opts = check_params(opts,[:csr_ids])
  super(opts)
end

#certificate_request_export_to_file(opts) ⇒ Object

Exports this certificate requests to the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :csr_ids (String)

    The string identifications of the certificate requests to export.

  • :file_names (String)

    The files associated with the specified certificates to export to.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



237
238
239
240
# File 'lib/icontrol/management/key_certificate.rb', line 237

def certificate_request_export_to_file(opts)
  opts = check_params(opts,[:csr_ids,:file_names,:overwrite])
  super(opts)
end

#certificate_request_export_to_pem(opts) ⇒ String

Exports this certificate requests to PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :csr_ids (String)

    The string identifications of the certificate requests to export.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



251
252
253
254
# File 'lib/icontrol/management/key_certificate.rb', line 251

def certificate_request_export_to_pem(opts)
  opts = check_params(opts,[:csr_ids])
  super(opts)
end

#certificate_request_generate(opts) ⇒ Object

Generates this certificate signing requests. This assumes that each of the associated keys, having the same identification as each certificate request, has already been created.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



268
269
270
271
# File 'lib/icontrol/management/key_certificate.rb', line 268

def certificate_request_generate(opts)
  opts = check_params(opts,[:csrs,:x509_data,:overwrite])
  super(opts)
end

#certificate_request_import_from_file(opts) ⇒ Object

Imports/installs this certificate requests from the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :csr_ids (String)

    The string identifications of the certificate requests to import/install.

  • :file_names (String)

    The files associated with the specified certificate requests from which to import.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



283
284
285
286
# File 'lib/icontrol/management/key_certificate.rb', line 283

def certificate_request_import_from_file(opts)
  opts = check_params(opts,[:csr_ids,:file_names,:overwrite])
  super(opts)
end

#certificate_request_import_from_pem(opts) ⇒ Object

Imports/installs this certificate requests from the given PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :csr_ids (String)

    The string identifications of the certificate requests to import/install.

  • :pem_data (String)

    The PEM-formatted data associated with the specified certificates.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the certificate request files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



298
299
300
301
# File 'lib/icontrol/management/key_certificate.rb', line 298

def certificate_request_import_from_pem(opts)
  opts = check_params(opts,[:csr_ids,:pem_data,:overwrite])
  super(opts)
end

#certificate_request_listCertificateRequestInformation

Gets the list of all CSRs and their information.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



402
403
404
# File 'lib/icontrol/management/key_certificate.rb', line 402

def certificate_request_list
  super
end

#export_all_to_archive_file(opts) ⇒ Object

Exports all currently installed keys and certificates into this archive file. The archive file is a .tgz file that will contain all keys and certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_location (String)

    The location of the archive file.

  • :archive_name (String)

    The archive file name.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



313
314
315
316
# File 'lib/icontrol/management/key_certificate.rb', line 313

def export_all_to_archive_file(opts)
  opts = check_params(opts,[:archive_location,:archive_name])
  super(opts)
end

#export_all_to_archive_streamchar

Exports all currently installed keys and certificates into the returned archive stream. The returned archive stream is basically the contents of a .tgz file that contains all keys and certificates.

Returns:

  • (char)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



327
328
329
# File 'lib/icontrol/management/key_certificate.rb', line 327

def export_all_to_archive_stream
  super
end

#export_to_archive_file(opts) ⇒ Object

Exports this keys and certificates into this archive file. The archive file is a .tgz file that will contain only this keys and certificates that have been exported.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_location (String)

    The location of the archive file.

  • :archive_name (String)

    The archive file name.

  • :keys (String)

    The string identifications of the keys to be exported.

  • :certs (String)

    The string identifications of the certificates to be exported.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



343
344
345
346
# File 'lib/icontrol/management/key_certificate.rb', line 343

def export_to_archive_file(opts)
  opts = check_params(opts,[:archive_location,:archive_name,:keys,:certs])
  super(opts)
end

#export_to_archive_stream(opts) ⇒ char

Exports this keys and certificates into the returned archive stream. The returned archive stream is basically the contents of a .tgz file that contains the exported keys and certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :keys (String)

    The string identifications of the keys to be exported.

  • :certs (String)

    The string identifications of the certificates to be exported.

Returns:

  • (char)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



360
361
362
363
# File 'lib/icontrol/management/key_certificate.rb', line 360

def export_to_archive_stream(opts)
  opts = check_params(opts,[:keys,:certs])
  super(opts)
end

#import_all_from_archive_file(opts) ⇒ Object

Imports/installs all keys and certificates from this archive file. The archive file should be a .tgz file that contains all keys and certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_location (String)

    The location of the archive file.

  • :archive_name (String)

    The archive file name.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



435
436
437
438
# File 'lib/icontrol/management/key_certificate.rb', line 435

def import_all_from_archive_file(opts)
  opts = check_params(opts,[:archive_location,:archive_name])
  super(opts)
end

#import_all_from_archive_stream(opts) ⇒ Object

Imports/installs all keys and certificates from the incoming archive stream. The archive stream should be the contents of a .tgz file that contains all keys and certificates.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_stream (char)

    The archive stream from which to import keys and certificates.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



449
450
451
452
# File 'lib/icontrol/management/key_certificate.rb', line 449

def import_all_from_archive_stream(opts)
  opts = check_params(opts,[:archive_stream])
  super(opts)
end

#import_from_archive_file(opts) ⇒ Object

Imports/installs this keys and certificates from this archive file. The archive file should be a .tgz file that may contain more keys and certificates than what will be imported/installed.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_location (String)

    The location of the archive file.

  • :archive_name (String)

    The archive file name.

  • :keys (String)

    The string identifications of the keys to be imported/installed.

  • :certs (String)

    The string identifications of the certificates to be imported/installed.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



467
468
469
470
# File 'lib/icontrol/management/key_certificate.rb', line 467

def import_from_archive_file(opts)
  opts = check_params(opts,[:archive_location,:archive_name,:keys,:certs])
  super(opts)
end

#import_from_archive_stream(opts) ⇒ Object

Imports/installs this keys and certificates from the incoming archive stream. The archive stream should be the contents of a .tgz file that may contain more keys and certificates than what will be imported/installed.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :archive_stream (char)

    The archive stream from which to import keys and certificates.

  • :keys (String)

    The string identifications of the keys to be imported/installed.

  • :certs (String)

    The string identifications of the certificates to be imported/installed.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



484
485
486
487
# File 'lib/icontrol/management/key_certificate.rb', line 484

def import_from_archive_stream(opts)
  opts = check_params(opts,[:archive_stream,:keys,:certs])
  super(opts)
end

#is_fips_availableboolean

Checks to see if the device supports FIPS security.

Returns:

  • (boolean)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



496
497
498
# File 'lib/icontrol/management/key_certificate.rb', line 496

def is_fips_available
  super
end

#key_delete(opts) ⇒ Object

Deletes/uninstalls this keys.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to delete/uninstall.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



508
509
510
511
# File 'lib/icontrol/management/key_certificate.rb', line 508

def key_delete(opts)
  opts = check_params(opts,[:key_ids])
  super(opts)
end

#key_export_to_file(opts) ⇒ Object

Exports this keys to the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to export.

  • :file_names (String)

    The files associated with the specified keys to export to.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the key files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



523
524
525
526
# File 'lib/icontrol/management/key_certificate.rb', line 523

def key_export_to_file(opts)
  opts = check_params(opts,[:key_ids,:file_names,:overwrite])
  super(opts)
end

#key_export_to_pem(opts) ⇒ String

Exports this keys to PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to export.

Returns:

  • (String)

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



537
538
539
540
# File 'lib/icontrol/management/key_certificate.rb', line 537

def key_export_to_pem(opts)
  opts = check_params(opts,[:key_ids])
  super(opts)
end

#key_generate(opts) ⇒ Object

Generates this keys.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :keys (IControl::Management::KeyCertificate::Key)

    The keys to generate.

  • :x509_data (IControl::Management::KeyCertificate::X509Data)

    The x509 data associated with the specified keys.

  • :create_optional_cert_csr (boolean)

    The boolean indicating whether we should optionally create the associated certificate and certificate request (CSR).

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the key files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



553
554
555
556
# File 'lib/icontrol/management/key_certificate.rb', line 553

def key_generate(opts)
  opts = check_params(opts,[:keys,:x509_data,:create_optional_cert_csr,:overwrite])
  super(opts)
end

#key_import_from_file(opts) ⇒ Object

Imports/installs this keys from the given files.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to import/install.

  • :file_names (String)

    The key files associated with the specified keys from which to import.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the key files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



568
569
570
571
# File 'lib/icontrol/management/key_certificate.rb', line 568

def key_import_from_file(opts)
  opts = check_params(opts,[:key_ids,:file_names,:overwrite])
  super(opts)
end

#key_import_from_pem(opts) ⇒ Object

Imports/installs this keys from the given PEM-formatted data.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to import/install.

  • :pem_data (String)

    The PEM-formatted data associated with the specified keys.

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the key files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



583
584
585
586
# File 'lib/icontrol/management/key_certificate.rb', line 583

def key_import_from_pem(opts)
  opts = check_params(opts,[:key_ids,:pem_data,:overwrite])
  super(opts)
end

#key_listKeyInformation

Gets the list of all installed keys and their information.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



413
414
415
# File 'lib/icontrol/management/key_certificate.rb', line 413

def key_list
  super
end

#key_to_fips(opts) ⇒ Object

Converts this keys to FIPS-enabled keys.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :key_ids (String)

    The string identifications of the keys to convert.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



596
597
598
599
# File 'lib/icontrol/management/key_certificate.rb', line 596

def key_to_fips(opts)
  opts = check_params(opts,[:key_ids])
  super(opts)
end

#pkcs12_import_from_file(opts) ⇒ Object

Imports/installs this pkcs12 (Public Key Cryptography Standard #12) information from the given files. This includes keys and certificates, and each file is optionally password-encrypted.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :ids (String)

    The string identifications of the keys & certificates to import/install.

  • :file_names (String)

    The files from which to import.

  • :passwords (String)

    The passwords associated with the specified files (empty string means no password).

  • :overwrite (boolean)

    The boolean indicating whether we should overwrite the key & certificate files on disk if they existed. If this parameter is false, and the files already exist, then a “Would overwrite” exception will be generated.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



614
615
616
617
# File 'lib/icontrol/management/key_certificate.rb', line 614

def pkcs12_import_from_file(opts)
  opts = check_params(opts,[:ids,:file_names,:passwords,:overwrite])
  super(opts)
end

#versionString

Gets the version information for this interface.

Returns:

  • (String)


421
422
423
# File 'lib/icontrol/management/key_certificate.rb', line 421

def version
  super
end