Class: LiveIdentity::IDCRL::Structs::CertSet

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/live_identity/idcrl/structs.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.buildObject



156
157
158
159
160
161
162
163
# File 'lib/live_identity/idcrl/structs.rb', line 156

def self.build
    certSet = CertSet.new
    certSet[:pCertContext]   = FFI::MemoryPointer.new(:pointer)
    certSet[:pCACertContext] = FFI::MemoryPointer.new(:pointer)
    certSet[:cbPOP] = 0
    certSet[:pbPOP] = FFI::MemoryPointer.new(:PBYTE)
    certSet
end

Instance Method Details

#CACertContextObject



174
175
176
# File 'lib/live_identity/idcrl/structs.rb', line 174

def CACertContext
    @CertContext ||= CERT_CONTEXT.new(self[:pCACertContext])
end

#CACertContext=(caCertContext) ⇒ Object



178
179
180
181
# File 'lib/live_identity/idcrl/structs.rb', line 178

def CACertContext= (caCertContext)
    @CACertContext = caCertContext
    self[:pCACertContext] = FFI::MemoryPointer.new(caCertContext)
end

#CertContextObject



165
166
167
# File 'lib/live_identity/idcrl/structs.rb', line 165

def CertContext
    @CertContext ||= CERT_CONTEXT.new(self[:pCertContext])
end

#CertContext=(certContext) ⇒ Object



169
170
171
172
# File 'lib/live_identity/idcrl/structs.rb', line 169

def CertContext= (certContext)
    @CertContext = certContext
    self[:pCertContext] = FFI::MemoryPointer.new(certContext)
end

#POPObject



183
184
185
# File 'lib/live_identity/idcrl/structs.rb', line 183

def POP
    @POP ||= self[:pbPOP].read_string(self[:cbPOP])
end

#POP=(pop) ⇒ Object



187
188
189
190
191
# File 'lib/live_identity/idcrl/structs.rb', line 187

def POP= (pop)
    @POP = pop
    self[:cbPOP] = pop.bytesize
    self[:pbPOP] = FFI::MemoryPointer.from_string(pop)
end