Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c authored by Ralf S. Engelschall on 21 December 1998, 11:00:56 UTC, committed by Ralf S. Engelschall on 21 December 1998, 11:00:56 UTC
Import of old SSLeay release: SSLeay 0.9.1b (unreleased)
1 parent 58964a4
  • Files
  • Changes
  • 2f74e0c
  • /
  • doc
  • /
  • obj.doc
Raw File
Cook and download a directory from the Software Heritage Vault

You have requested the cooking of the directory with identifier None into a standard tar.gz archive.

Are you sure you want to continue ?

Download a directory from the Software Heritage Vault

You have requested the download of the directory with identifier None as a standard tar.gz archive.

Are you sure you want to continue ?

Cook and download a revision from the Software Heritage Vault

You have requested the cooking of the history heading to revision with identifier swh:1:rev:dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c into a bare git archive.

Are you sure you want to continue ?

Download a revision from the Software Heritage Vault

You have requested the download of the history heading to revision with identifier swh:1:rev:dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c as a bare git archive.

Are you sure you want to continue ?

Invalid Email !

The provided email is not well-formed.

Download link has expired

The requested archive is no longer available for download from the Software Heritage Vault.

Do you want to cook it again ?

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • content
revision badge
swh:1:rev:dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c
content badge Iframe embedding
swh:1:cnt:bad347c9366a4aa369ed207ed878db615b90ca26
obj.doc
The Object library.

As part of my Crypto library, I found I required a method of identifying various
objects.  These objects normally had 3 different values associated with
them, a short text name, a long (or lower case) text name, and an
ASN.1 Object Identifier (which is a sequence of numbers).
This library contains a static list of objects and functions to lookup
according to one type and to return the other types.

To use these routines, 'Object.h' needs to be included.

For each supported object, #define entries are defined as follows
#define SN_Algorithm			"Algorithm"
#define LN_algorithm			"algorithm"
#define NID_algorithm			38
#define OBJ_algorithm			1L,3L,14L,3L,2L

SN_  stands for short name.
LN_  stands for either long name or lowercase name.
NID_ stands for Numeric ID.  I each object has a unique NID and this
     should be used internally to identify objects.
OBJ_ stands for ASN.1 Object Identifier or ASN1_OBJECT as defined in the
     ASN1 routines.  These values are used in ASN1 encoding.

The following functions are to be used to return pointers into a static
definition of these types.  What this means is "don't try to free() any
pointers returned from these functions.

ASN1_OBJECT *OBJ_nid2obj(
int n);
	Return the ASN1_OBJECT that corresponds to a NID of n.
	
char *OBJ_nid2ln(
int n);
	Return the long/lower case name of the object represented by the
	NID of n.
	
char *OBJ_nid2sn(
int n);
	Return the short name for the object represented by the NID of n.

ASN1_OBJECT *OBJ_dup(
ASN1_OBJECT *o);
	Duplicate and return a new ASN1_OBJECT that is the same as the
	passed parameter.
	
int OBJ_obj2nid(
ASN1_OBJECT *o);
	Given ASN1_OBJECT o, return the NID that corresponds.
	
int OBJ_ln2nid(
char *s);
	Given the long/lower case name 's', return the NID of the object.
	
int OBJ_sn2nid(
char *s);
	Given the short name 's', return the NID of the object.
	
char *OBJ_bsearch(
char *key,
char *base,
int num,
int size,
int (*cmp)());
	Since I have come across a few platforms that do not have the
	bsearch() function, OBJ_bsearch is my version of that function.
	Feel free to use this function, but you may as well just use the
	normal system bsearch(3) if it is present.  This version also
	has tolerance of being passed NULL pointers.
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top