This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

OpenSSL::Netscape::SPKI

        # OpenSSL::Netscape::SPKI < Object

(from ruby core)
---
A Simple Public Key Infrastructure implementation (pronounced "spooky").
The structure is defined as
    PublicKeyAndChallenge ::= SEQUENCE {
      spki SubjectPublicKeyInfo,
      challenge IA5STRING
    }

    SignedPublicKeyAndChallenge ::= SEQUENCE {
      publicKeyAndChallenge PublicKeyAndChallenge,
      signatureAlgorithm AlgorithmIdentifier,
      signature BIT STRING
    }

where the definitions of SubjectPublicKeyInfo and AlgorithmIdentifier
can be found in RFC5280. SPKI is typically used in browsers for
generating a public/private key pair and a subsequent certificate
request, using the HTML <keygen> element.

## Examples

### Creating an SPKI
    key = OpenSSL::PKey::RSA.new 2048
    spki = OpenSSL::Netscape::SPKI.new
    spki.challenge = "RandomChallenge"
    spki.public_key = key.public_key
    spki.sign(key, OpenSSL::Digest.new('SHA256'))
    #send a request containing this to a server generating a certificate

### Verifying an SPKI request
    request = #...
    spki = OpenSSL::Netscape::SPKI.new request
    unless spki.verify(spki.public_key)
      # signature is invalid
    end
    #proceed
---
# Class methods:

    new

# Instance methods:

    challenge
    challenge=
    public_key
    public_key=
    sign
    to_der
    to_pem
    to_s
    to_text
    verify


      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.