v0.7.1: publish correct browser distributables
This commit is contained in:
		
							parent
							
								
									023669ad6b
								
							
						
					
					
						commit
						b051cb96b0
					
				| @ -8,8 +8,8 @@ and [Keypairs.js](https://git.rootprojects.org/root/keypairs.js) | |||||||
| Lightweight, Zero-Dependency, x509 encoder and decoder for Node.js and Browsers | Lightweight, Zero-Dependency, x509 encoder and decoder for Node.js and Browsers | ||||||
| 
 | 
 | ||||||
| | 1.6k gzipped | | 1.6k gzipped | ||||||
| | 6.9k minified | | 6.8k minified | ||||||
| | 9.9k pretty | | 9.7k pretty | ||||||
| | | | | ||||||
| 
 | 
 | ||||||
| This provides a set ASN.1 / x509 schemas for DER encoding and decoding | This provides a set ASN.1 / x509 schemas for DER encoding and decoding | ||||||
|  | |||||||
							
								
								
									
										15
									
								
								dist/x509.all.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								dist/x509.all.js
									
									
									
									
										vendored
									
									
								
							| @ -665,23 +665,13 @@ X509.parseRsaPkcs8 = function parseRsaPkcs8(asn1, jwk) { | |||||||
| 
 | 
 | ||||||
| 	// might be a buffer
 | 	// might be a buffer
 | ||||||
| 	if (!Array.isArray(asn1)) { | 	if (!Array.isArray(asn1)) { | ||||||
| 		/* |  | ||||||
| 		console.log( |  | ||||||
| 			JSON.stringify(ASN1.parse({ der: asn1, verbose: true, json: false }), null, 2) |  | ||||||
| 		); |  | ||||||
|     */ |  | ||||||
| 		asn1 = ASN1.parse({ der: asn1, verbose: true, json: false }); | 		asn1 = ASN1.parse({ der: asn1, verbose: true, json: false }); | ||||||
| 	} | 	} | ||||||
| 	if ( | 	if ( | ||||||
| 		2 === asn1.children.length && | 		2 === asn1.children.length && | ||||||
| 		0x03 === asn1.children[1].type && | 		0x03 === asn1.children[1].type // && 2 === asn1.children[1].children.length
 | ||||||
| 		0x30 === asn1.children[1].value[0] |  | ||||||
| 	) { | 	) { | ||||||
| 		asn1 = ASN1.parse({ | 		asn1 = asn1.children[1].children[0]; | ||||||
| 			der: asn1.children[1].value, |  | ||||||
| 			verbose: true, |  | ||||||
| 			json: false |  | ||||||
| 		}); |  | ||||||
| 		jwk.n = Enc.bufToUrlBase64(asn1.children[0].value); | 		jwk.n = Enc.bufToUrlBase64(asn1.children[0].value); | ||||||
| 		jwk.e = Enc.bufToUrlBase64(asn1.children[1].value); | 		jwk.e = Enc.bufToUrlBase64(asn1.children[1].value); | ||||||
| 		jwk.kty = 'RSA'; | 		jwk.kty = 'RSA'; | ||||||
| @ -713,7 +703,6 @@ X509.parseSpki = function(buf, jwk) { | |||||||
| 	try { | 	try { | ||||||
| 		return X509.parseRsaPkcs8(buf, jwk); | 		return X509.parseRsaPkcs8(buf, jwk); | ||||||
| 	} catch (e) { | 	} catch (e) { | ||||||
| 		//console.error(e);
 |  | ||||||
| 		return X509.parseEcSpki(buf, jwk); | 		return X509.parseEcSpki(buf, jwk); | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/x509.all.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/x509.all.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										15
									
								
								dist/x509.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								dist/x509.js
									
									
									
									
										vendored
									
									
								
							| @ -147,23 +147,13 @@ X509.parseRsaPkcs8 = function parseRsaPkcs8(asn1, jwk) { | |||||||
| 
 | 
 | ||||||
| 	// might be a buffer
 | 	// might be a buffer
 | ||||||
| 	if (!Array.isArray(asn1)) { | 	if (!Array.isArray(asn1)) { | ||||||
| 		/* |  | ||||||
| 		console.log( |  | ||||||
| 			JSON.stringify(ASN1.parse({ der: asn1, verbose: true, json: false }), null, 2) |  | ||||||
| 		); |  | ||||||
|     */ |  | ||||||
| 		asn1 = ASN1.parse({ der: asn1, verbose: true, json: false }); | 		asn1 = ASN1.parse({ der: asn1, verbose: true, json: false }); | ||||||
| 	} | 	} | ||||||
| 	if ( | 	if ( | ||||||
| 		2 === asn1.children.length && | 		2 === asn1.children.length && | ||||||
| 		0x03 === asn1.children[1].type && | 		0x03 === asn1.children[1].type // && 2 === asn1.children[1].children.length
 | ||||||
| 		0x30 === asn1.children[1].value[0] |  | ||||||
| 	) { | 	) { | ||||||
| 		asn1 = ASN1.parse({ | 		asn1 = asn1.children[1].children[0]; | ||||||
| 			der: asn1.children[1].value, |  | ||||||
| 			verbose: true, |  | ||||||
| 			json: false |  | ||||||
| 		}); |  | ||||||
| 		jwk.n = Enc.bufToUrlBase64(asn1.children[0].value); | 		jwk.n = Enc.bufToUrlBase64(asn1.children[0].value); | ||||||
| 		jwk.e = Enc.bufToUrlBase64(asn1.children[1].value); | 		jwk.e = Enc.bufToUrlBase64(asn1.children[1].value); | ||||||
| 		jwk.kty = 'RSA'; | 		jwk.kty = 'RSA'; | ||||||
| @ -195,7 +185,6 @@ X509.parseSpki = function(buf, jwk) { | |||||||
| 	try { | 	try { | ||||||
| 		return X509.parseRsaPkcs8(buf, jwk); | 		return X509.parseRsaPkcs8(buf, jwk); | ||||||
| 	} catch (e) { | 	} catch (e) { | ||||||
| 		//console.error(e);
 |  | ||||||
| 		return X509.parseEcSpki(buf, jwk); | 		return X509.parseEcSpki(buf, jwk); | ||||||
| 	} | 	} | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								dist/x509.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/x509.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,6 +1,6 @@ | |||||||
| { | { | ||||||
| 	"name": "@root/x509", | 	"name": "@root/x509", | ||||||
| 	"version": "0.7.0", | 	"version": "0.7.1", | ||||||
| 	"description": "VanillaJS, Lightweight, Zero-Dependency, X509 schema encoder and decoder.", | 	"description": "VanillaJS, Lightweight, Zero-Dependency, X509 schema encoder and decoder.", | ||||||
| 	"main": "index.js", | 	"main": "index.js", | ||||||
| 	"browser": { | 	"browser": { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user