Class: Vertx::SelfSignedCertificate

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb

Overview

A self-signed certificate helper for testing and development purposes.

While it helps for testing and development, it should never ever be used in production settings.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


20
21
22
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 20

def @@j_api_type.accept?(obj)
  obj.class == SelfSignedCertificate
end

+ (::Vertx::SelfSignedCertificate) create + (::Vertx::SelfSignedCertificate) create(fqdn)

Create a new SelfSignedCertificate instance with a fully-qualified domain name,

Overloads:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 66

def self.create(*args)
  if !block_given? && args[0] == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreNet::SelfSignedCertificate.java_method(:create, []).call(),::Vertx::SelfSignedCertificate)
  elsif args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreNet::SelfSignedCertificate.java_method(:create, [Java::java.lang.String.java_class]).call(args[0]),::Vertx::SelfSignedCertificate)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]})"
  end
end

+ (Object) j_api_type



29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 29

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 32

def self.j_class
  Java::IoVertxCoreNet::SelfSignedCertificate.java_class
end

+ (Object) unwrap(obj)



26
27
28
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 26

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



23
24
25
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 23

def @@j_api_type.wrap(obj)
  SelfSignedCertificate.new(obj)
end

Instance Method Details

- (String) certificatePath

Filesystem path to the X.509 certificate file in PEM format .

Returns:

  • (String)
    the absolute path to the certificate.


38
39
40
41
42
43
44
45
46
47
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 38

def certificate_path
  if !block_given?
    return @j_del.java_method(:certificatePath, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling certificate_path()"
  end
end

- (void) delete

This method returns an undefined value.

Delete the private key and certificate files.


107
108
109
110
111
112
113
114
115
116
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 107

def delete
  if !block_given?
    return @j_del.java_method(:delete, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete()"
  end
end

- (Hash{String => Object}) keyCertOptions

Provides the Nil RSA private key file in PEM format corresponding to the #private_key_path

Returns:

  • (Hash{String => Object})
    a => Object} based on the generated certificate.


94
95
96
97
98
99
100
101
102
103
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 94

def key_cert_options
  if !block_given?
    return @j_del.java_method(:keyCertOptions, []).call() != nil ? JSON.parse(@j_del.java_method(:keyCertOptions, []).call().toJson.encode) : nil
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling key_cert_options()"
  end
end

- (String) privateKeyPath

Filesystem path to the RSA private key file in PEM format

Returns:

  • (String)
    the absolute path to the private key.


51
52
53
54
55
56
57
58
59
60
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 51

def private_key_path
  if !block_given?
    return @j_del.java_method(:privateKeyPath, []).call()
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling private_key_path()"
  end
end

- (Hash{String => Object}) trustOptions

Provides the Nil X.509 certificate file in PEM format corresponding to the #certificate_path

Returns:

  • (Hash{String => Object})
    a => Object} based on the generated certificate.


81
82
83
84
85
86
87
88
89
90
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/self_signed_certificate.rb', line 81

def trust_options
  if !block_given?
    return @j_del.java_method(:trustOptions, []).call() != nil ? JSON.parse(@j_del.java_method(:trustOptions, []).call().toJson.encode) : nil
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling trust_options()"
  end
end